Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call a Script?

Status
Not open for further replies.

tEkHEd

IS-IT--Management
Joined
Jan 29, 2003
Messages
261
Location
GB
Hi there..

Can I call a VBS via an OnClick Event Procedure? If so how?

I can't seem to find anything like DoCmd.Run.... that I can use for a VBS..

Or would I have to amend the VBS to VBA?

Thanks in adv.
 
Hi,

I don't know if you can call your script, but if you select the right reference then you should be able to copy & paste your script straight into your OnClick event (there's about 3 references that mention scripts, I just selected them all to start with as I didn't know which I needed, when I get a chance I'll look at them in object browser & see what I really need!)

Hope that's some use

Sharon
 
Sharon..

Thanks for your reply.. actually just after posting I thought that I should be able to do that, and just pasted the whole script in..

There were a couple of things that I had to change (variable declarations and types) and a couple of command structures, but apart from that it all worked smoothly :)

FYI: I didn't need to add any further VB references for this to work.. here are a list of the references that I have installed..

Code:
Visual Basic For Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Forms 2.0 Object Library
Microsoft Access Wizard Control Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft ADO Ext. 2.7 for DDL and Security
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top