r/visualbasic • • Aug 09 '26

VB.NET Help Adding string values to a listbox?

Post image
11 Upvotes

So I'm following a tutorial about VB for beginners, and one of the sections is where the guy assigns values to a listbox through its properties menu. He clicks the 3 dots next to "items" and just types all the options in.

I'm on a newer version though, and when I click on the 3 dots it doesn't let me type it all straight in - there's a dropdown menu for buttons, listbox items, etc. None of them work because apparently I can't convert a list item to a string, even though I used .SelectedOption

Am I looking in the wrong menu or something? How do I put a string into my listbox

r/visualbasic • • 10d ago

VB.NET Help Vb

0 Upvotes

Ghnk

r/visualbasic • • Jun 21 '26

VB.NET Help Recommend me books about VB and VB.NET

17 Upvotes

I'm looking for books, either the PDF file or the title itself. Basic books are fine, but I'd prefer advanced books that are useful for automation. I'm not looking for anything specific beyond that, and if you know of anything interesting, especially if it's hard to find, I'd be very grateful.

r/visualbasic • • Mar 20 '26

VB.NET Help Visual Studio HRESULT: 0x8000FFFF E_UNEXPECTED help

Post image
1 Upvotes

For some context, I'm doing a coding test at school and got this error so I tried to recreate it at home. I had to add 3 separate projects for 3 different coding tasks in VB. When I tried to rename the Form1.vb to something more organised (through the solution explorer) I got this error. How do I fix this? And if I'm renaming forms wrong what is the right way.

r/visualbasic • • Oct 18 '26

VB.NET Help Decimal variable gets truncated automatically to a double and I don't understand why, and how to circumvent it

3 Upvotes

I had problems with accuracy in my project so I created this bit of code to try to understand and I'm even more confused. When declaring test1, Visual Studio automatically truncates the number to a double as soon as I finish typing it. I don't understand how to work with a Decimal variable, because how do you store anything in it without it converting to a double for some reason? I understand putting the D at the end but how do I add it when storing the result of a math formula?

 Sub main()
     Dim test1 As Decimal = 0.12345678901232222
     Dim test2 As Decimal = 0.1234567890123456789012345678D
     Console.Write(test1)
     Console.Write(test2)
     test1 = 23 / 94
     test2 = 23 / 94
     Console.Write(test1)
     Console.Write(test2)
 End Sub

This gives me those results :

0.123456789012322

0.1234567890123456789012345678

0.24468085106383

0.24468085106383

r/visualbasic • • Jan 31 '24

VB.NET Help Does upgrading a .NET 4.8 project to SDK format improve anything?

2 Upvotes

I recently saw a post of the csharp sub that changing the a .NET 4.8 project format to SDK style gives you access to the latest version of c#.

Does something similar apply to VB.NET projects? If so, what features exactly are enabled?

r/visualbasic • • Jul 09 '21

VB.NET Help Windows keeps deleting my .exe, thinking it's a virus.

12 Upvotes

As of a week ago, a program I made (a discord bot) which had been running for many weeks straight without any issue; shut down and the exe was deleted. I rebuilt and it ran for a bit, then it was deleted.

Windows defender classified it as harmful and was removing it.

I added it to the safe list. No luck. I deactivated windows firewall (and defend?) No luck

Any help?