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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi,

You would have to use late binding. Why have you decided to use VB Script?
 
Upvote 0

westconn1

Board Regular
Joined
Feb 20, 2009
Messages
245
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

ShamonMF

New Member
Joined
Feb 13, 2009
Messages
11
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,191,611
Messages
5,987,667
Members
440,104
Latest member
thigarette

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