VBA to VB??

K_Man95

Board Regular
Joined
Jul 31, 2002
Messages
158
Can you take code from VBA in Excel and migrate it into straight VB Studio? How difficult would it be to convert code in VBA into VB code without having to start over?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
It's not very hard at all. Basically what's required is creating an application object that points to excel. From there, you just reference the object like you would any other object:

myXLAPP.workbooks("myworkbook").sheets("mysheet").range("myrange").value
 
Upvote 0
That is cool..... my concern is then I still have some limitations in Excel. I strictly want to take what I have in Excel and migrate it over to VB so that I no longer have Excel attached... not even pointing to it or referencing an object or anything... I just want to stop using VBA and start using VB without having to start all over. Is there a way to do that?
This message was edited by K_Man95 on 2002-10-25 20:36
 
Upvote 0
Uhh, not sure what you are asking exactly. If your code doesn't interract with Excel, why did you even code it in Excel VBA to begin with?
 
Upvote 0
When I got started on this project, it was already started in Excel for me. I have just taken it further. Well, over the course of a few months as this tool has started to develope, my collegues and I have come up with new ideas for this tool, but we don't want to have wasted all our time. We were hoping that we could just migrate directly over to VB without loosing that which we already have. I know, I forgot to look into the crystal ball to foresee this coming.... lol. Just asking if this can be done and if so, how difficult? or will this mean starting over from scratch?
 
Upvote 0
Most of the functions in VB are the same as they are in VBA. It just depends what kind of stuff you are doing.... It depends on the code, methods, etc

Might want to check the site below :)
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

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