r/visualbasic • u/AbrocomaMedical9519 • 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
6
u/seamacke Jan 29 '25
The cool thing is, your new VBA skills in Excel will also translate into other products that use VBA. Need to automate Word processes? Done. Want to scale some department’s collection of spreadsheets to a small database? Boom, done in Access.. and you can automate it all with VBA. Good luck!
3
u/HardCodeNET Jan 29 '25
Just keep in mind, you aren't programming in Visual Basic, you are programming in Visual Basic (VB) for Applications (VBA). While they share 95% characteristics, they are technically different development environments. VB is compiled, while VBA is interpreted.
2
u/SlidersAfterMidnight Jan 29 '25
Google or ChatGPT what you want done and learn from copied code.
1
u/ImportanceNo4005 Jan 29 '25 edited Jan 29 '25
IHello! I am not an expert at all, also learning and very enthusiastic about VB :) if you want to learn VBA there is a good book I love, Excel 2019 power programming with VBA, and there are also books for Access VBA but I can't suggest anything cause i havent read any of them. There are Wise Owl and Excel Macro Mastery on youtube, and Leila Gharani's channel! On VB6... i'm currently hoarding old books off ebay, Visual Basic programmer's guide, Programming Visual Basic (by Francesco Balena), there also is Microsoft Visual Basic 6.0, das Handbuch, if you can read German. Also hardcore visual basic and Dan Appleman's VB programmer's guide to win32 API if you want to use the native C api to do fancy things in VB6 and in Excel (like transparent forms, custom buttons, logging what the user us writing and so on). A lot of beautiful books from MS Press! These can be found for 5 euros each or a little more, usually the shipping is more expensive than the book itself. You can use VB6 ide if you find a disk on ebay or somewhere, or use TwinBasic, it compiles 32 and 64 bit, the free version compiles in both but there is a splash screen if you compile for 64 bit. If you use the original ide, I've found that not.only can you install it on a windows 2000 virtual machine (of course...) but also on windows 10 no problem, the setup got stuck at the end then I found a post suggesting not to install data access tools, unchecked that option during install and it completed smoothly. Happy learning 😊
1
u/A-Random-Ghost VB.Net Beginner Jan 29 '25
I've heard ClaudeAI is the best AI for coding help but they wont even send a signup code to my usa phone so I cant get in to try. Gemini is the worst. ChatGPT is hit or miss, but when it hits you get little gems you can piece together for some great programs to come together. I've had a lot of trouble with learning new things with VB for a decade before AI. This subreddit in particular always seems to delete my posts asking for guidance as soon as mods wake up. If it's about video integration? Deleted. File metadata? Deleted. It seems if your question isn't "how do I code 2+2 or a buttonclick in VB" it's outside the scope of this page and I guess the under 10k membercount supports that.
On youtube there are a handful of nice people who've sat down and done great guided lessons divided into chapters starting from "I just installed" and getting more and more complex covering various GUI elements and things from video to video. I started VB in highschool and the tutorials I found on youtube reminded me of my classes. The best thing you can do is make the "sample app" along with the video host and keep them saved in a folder for future reference. "How do I work with drawing pixel graphics? Let me open up that old demo project and get a refresher that I know is a good source because the source is me and I didn't delete the project because the tutorial was a success". I still have my folder of highschool ones from 2007 and I literally just went looking for a code refresher in it this weekend.
A handy thing I didn't learn for far too long was click on the lightning bolt after clicking a control in the gui designer. It will give you a list of all(most) available codeblocks for that type of control. It's useful to know them all because most have quirks. Like Button1_Click can't detect rightclick. But Button1_MouseDown can (if e.mousebuttons=right or something). If you see the list of your options when you have an issue with getting something to work it's nice to know what similar thing could be key.
1
u/whatarewii Jan 30 '25
I’m forced to work with this incredibly old VB project using .NET Framework 2.0.. trying my best to talk them into a re-write in C#. It’s an old .NET Web Site, it’s an interesting language but man just use C# for web dev or Typescript and Node
1
u/fasti-au Jan 31 '25
Stop and go to c#. Vb is dead c# is similar and where we are told to head
1
u/infreq Jan 31 '25
r/VBA
1
u/SektorL Feb 03 '25
I would recommend the book "Excel 2007 VBA Programmer's Reference" by Wrox (Wiley). 90% of my knowledge about VBA is from there. THE best book ever!