Comparison of VBA vs VB syntax etc

gifariz

Board Regular
Joined
May 2, 2021
Messages
128
Office Version
  1. 365
Platform
  1. Windows
I have been developing an API-based program using excel VBA because I can make user interface easily in excel worksheets. But the program is getting large and slow.
My program calls millions of API function each run, up to 1 hour. The calling iteration seems to overhead the running time and it cannot utilize parallel processing (CPU usage maxed out at 10%).
The API documentation says it offers "improved speed for external .NET clients that call the API by chaining properties and methods in deeply nested loops".

So I am thinking to migrate my program into VB, because it seems to have most similar syntax with my current VBA codes (minimum change needed) and support .NET.
Is there comparison/summary of VBA vs VB, especially syntax, I can refer to? I have difficulty finding it in google, mostly just comparison of what is VBA and what is VB.
One of things worry me is that I heavily use UDT in my program because it was easier for beginner like me than Class (OOP), but I am starting to regret it.
Also, any thoughts/suggestions of my attempt on migrating from VBA into .NET clients (I still don't know what this means) are very welcome and appreciated. I still don't know much thing outside VBA. Like whether it is good decision, or things I need to care for better future development.

Thank you.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
So this might seem a bit random, but I think the better approach is not to look for VBA->VB.NET, but rather look for resources, etc for VB6->VB.NET.

I'm a bit hazy on the dates, but Microsoft basically pulled the rug out from under the Visual Basic 6 community some 2 decades ago, and told them that they won't be supporting VB6 anymore and that they should all migrate to VB.NET because...ya know.. it's got VB in the name. It didn't go down too well. Anyway, at the time, a lot of companies and websites came up with solutions and guides on how to migrate code from VB6 to VB.NET, and they're still around today because the VB6 community are still kicking on.

Why do I mention VB6? It's actually the same language as VBA (despite a few slight differences). So I think you'd be better off looking at resources for VB6 to VB.NET than from VBA (though I have seen them somewhere...)
 
Upvote 0
Solution
Wow thank you! That
So this might seem a bit random, but I think the better approach is not to look for VBA->VB.NET, but rather look for resources, etc for VB6->VB.NET.

I'm a bit hazy on the dates, but Microsoft basically pulled the rug out from under the Visual Basic 6 community some 2 decades ago, and told them that they won't be supporting VB6 anymore and that they should all migrate to VB.NET because...ya know.. it's got VB in the name. It didn't go down too well. Anyway, at the time, a lot of companies and websites came up with solutions and guides on how to migrate code from VB6 to VB.NET, and they're still around today because the VB6 community are still kicking on.

Why do I mention VB6? It's actually the same language as VBA (despite a few slight differences). So I think you'd be better off looking at resources for VB6 to VB.NET than from VBA (though I have seen them somewhere...)
Wow thank you! That clears out a lot of things.
So many VB names, I thought there were only VB & VBA, and VB was always VB.NET, didn't know there is VB6 that doesn't support .NET (cmiiw).
You're right, "VB6 -> VB.NET" keyword results on much more resources.
 
Upvote 0
Thank you for the feedback. Just as an aside, you may be interested to learn about a language bring developed (currently in Beta) called TwinBasic - its designed to be 100% backwards compatible with VB6 and VBA. The imletus for it was to provide a 'home" for disaffected VB6 / VBA people. It will allows for the creation of standalone executables, DLL files etc.
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top