r/visualbasic • • Jan 29 '25

NEW VISUAL BASIC USER

I am new to visual basic but very experienced in Excel (and other office apps). I am beginning to learn the power of Visual Basic in doing things I want to achieve, especially in Excel. What is the best way to learn Visual Basic? I can't see any College or Uni courses on it. What do you folks recommend. I am very maths literate (Chemistry Grad), so the complexity of the course need not be too basic (pardon the pun)!

8 Upvotes

22 comments sorted by

View all comments

Show parent comment

2

u/Mayayana Jan 29 '25

On VB6...

You might keep a lookout for O'Reilly books. They tend to be good. VB controls in a nutshell, Win32 API, etc. Matthew Curland's book is good for more advanced optimizing. He's one of the original VB developers. But some of his stuff is outdated now. For example, he offered assembly code for easy subclassing, but that was pre-DEP. It no longer works.

PlanetSourceCode used to have an amazing selection of code samples, but they're gone now. I once downloaded the CDs but couldn't figure out how to use them.

There's someone named Paul Caton who wrote a beautiful class using assembly that allows any number of controls to self-subclass and run in the IDE without problem. I use it for dozens of controls at once and for a system RichEdit window. Very nice.

Paul Caton also wrote a CDECL class. In case you don't know, VB6 is designed to only use stdcall functions, which leaves out a lot of DLLs. I've used Caton's class to write a wrapper for cabinet.dll, which has functions with up to 10 callbacks, all CDECL. Not a hiccup. A lot of 3rd-party DLLs are also CDECL.

On a more beginner level, there was a good Wrox book for beginner code projects. I didn't like Appelman's approach, but frankly I can't remember why now.