VBA references question

ShamonMF

New Member
Joined
Feb 13, 2009
Messages
11
i have a macro that creates an ADO connnection object & manipulates the recordset within the macro in excel.

i wish to use the vba code to create a standalone .vbs file to run on a desktop.

In order for the code to work I have to reference the latest Active X library (for me 2.8), if not the code breaks.

When i stick the code in and run it from a vbs file it breaks in the same way, but i dont know how to make it reference the appropriate library from within a vbs.

I have NO experience of VB script, but some excel vba. Is there something I am missing here?
Cheers for any input you can offer :)
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

You would have to use late binding. Why have you decided to use VB Script?
 
Upvote 0
no references in vbs,
also do not specify any type for declared variables
most of the vbs code will run in vba ide, apart from things like wscript.echo
 
Upvote 0
cheers guys.

The intention initially was to avoid any user actions affecting the results that are copied into the sheet at the end of the routine.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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