VBA and VB.NET have a similar name, but are very different.
You can not use the same code/syntax from VBA for VB.NET.
You also can not "import" parts of the codes or forms, you have to rewrite everything.
What is the best way to transform VBA to a windows VB console application?
I have written a fully working Visual basic script for excel that uses a User form and an excel template to calculate and create another excel sheet. It is working fine.
Now, I am trying to create a VB console application (to be precise, a WinForms project) in visual basic. I started with manually creating the user form in visual studio item by item. Though it can be done, It is going to take a lot of time. Is there a better way to do this? Can we import the same user form and VB script? Can I use the same VBA code to create a WinForms console application? Also, can we use the same VBA code to create WinForms app? or it is mandatory that it should be written in VB.NET syntax?
Developer technologies Visual Basic for Applications
-
Olaf Helper 47,436 Reputation points
2022-08-30T09:44:44.197+00:00