Guidance on converting from vba to vb.net

cmccurdy
cmccurdy used Ask the Experts™
on
I have and upcoming project to port an extensive vba (access) program to vb.net.  Are there any books, tutorials or programs specifically targeted for vba programmers who need to learn vb.net?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014

Commented:
There's no clear path from VBA to .NET. You'd be better off determining the major functionality of the VBA system and recreate it entirely from .NET code. While some of your VBA code might work in VB.NET, it will be kludgy and difficult to maintain, and won't take advantage of the .NET framework.

I went down your same path several years back. I'm was an experienced Access developer (MVP for 10 years, quite a few major projects under my belt, good understanding of object-oriented programming, etc etc) ... and I struggled to grasp the concepts. If you're a drag-n-dropper, then you're going to have troubles. If you're used to working mostly with code, you're still gonna have troubles (although not nearly as much as a dnd'r).

I'd suggest some basic VB.NET tutorials from Microsoft or one of the online learning places. Get your head around the concepts, try a few pet projects, and understand the basics. Once I learned Visual Studio, going back to the VBA editor feels like working with hammers and chisels :)
Chief Technology Officer
Commented:
I had the same question: how to add VB.Net to my skill set.  I was primarily interested in adding VSTO, so as I did my research, I wrote everything down.  Here's what I found:

1.  Download the FREE version of VS2017 and SQL Server (2 separate downloads).  When you first start, you will find that VS2017 does NOT have all the easy-to-use capabilities of Access development.  For example, when you add a textbox to a form, you don't automatically get a linked label control with it - you have to add that to the form separately and you can't link 'em -frustrating.

2.  Find some good tutorials on the web like "Visual Basic 2017 Tutorial" (easy search.  I'm surprised how easy it is to google stuff like this and yet some folks don't seem to bother trying to do their homework.)
"Visual Basic 2017 Tutorial" site:   https://www.vbtutor.net/index.php/visual-basic-2017-tutorial/
This is the link to the table-of-contents web page.  The tutorial takes you thru step-by-step creation of a VB.Net Windows Forms application.   Windows Form applications is just one of the several types that you can build with VS2017 and most closely matches VBA development.  The tutorial has 38 lessons that cover:

1.      Lesson 1: Introduction to Visual Basic 2017
2.      Lesson 2: Designing the Interface
3.      Lesson 3: Adding Controls to the Form
4.      Lesson 4: Writing the Code
5.      Lesson 5: Working with Controls
6.      Lesson 6: List Box and Combo Box
7.      Lesson 7: Working with Picture Box
8.      Lesson 8: Managing Data
9.      Lesson 9: Working with Variables and Constants
10.      Lesson 10: Working with Arrays
11.      Lesson 11: Performing Arithmetic Operations
12.      Lesson 12: Working with Strings
13.      Lesson 13: Using If..Then….Else
14.      Lesson 14: Using Select Case
15.      Lesson 15: Looping
16.      Lesson 16: Sub Procedures
17.      Lesson 17: Functions
18.      Lesson 18: Mathematical Functions
19.      Lesson 19: Trigonometric Functions
20.      Lesson 20: Format Functions
21.      Lesson 21: Working with Checkboxes
22.      Lesson 22: Working with Radio Buttons
23.      Lesson 23: Creating a Web Browser
24.      Lesson 24: Handling Errors
25.      Lesson 25: Object-Oriented Programming
26.      Lesson 26: Introduction to Graphics
27.      Lesson 27: Drawing Rectangles
28.      Lesson 28: Drawing Ellipses and Circles
29.      Lesson 29: Drawing Text
30.      Lesson 30: Drawing Polygons and Pies
31.      Lesson 31: Filling Shapes with Colors
32.      Lesson 32: Using Timer
33.      Lesson 33: Creating Animation
34.      Lesson 34: Creating Databases
35.      Lesson 35: Creating Connection in Databases
36.      Lesson 36: Browsing and Editing Data
37.      Lesson 37: Building Console Application Part 1
38.      Lesson 38: Building Console Application Part 2

hope this helps....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial