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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

zacemmel

Well-known Member
Joined
Apr 29, 2002
Messages
636
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
 

K_Man95

Board Regular
Joined
Jul 31, 2002
Messages
158
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
 

zacemmel

Well-known Member
Joined
Apr 29, 2002
Messages
636
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?
 

K_Man95

Board Regular
Joined
Jul 31, 2002
Messages
158
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?
 

zacemmel

Well-known Member
Joined
Apr 29, 2002
Messages
636
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 :)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,036
Messages
5,856,959
Members
431,841
Latest member
jaybeem

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
Top