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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a Access 2000 Macro within VB6

Status
Not open for further replies.

moben

IS-IT--Management
Feb 5, 2002
116
GB
Does anyone know how to call and run a Access 2000 macro from within a VB6 application.

Any help appreciated,

Regards,

Moben.
 
Thank you Andy and StrongM,

Your advice was taken and desired results has been achieved.

One question, how does one switch off Access prompts, when running a Access macro from within VB6 ?

e.g. If I run Macro from within Access, I get prompted to "File already exists, do you wish to overwrite ?".. and yes I do.

If I run the Macro from VB6, how can I pass a 'Yes' to the prompt (not that its being displayed), but the Macro copies data from a Access table to a Excel spreadsheet.

All works fine, but if I open the Excel spreadsheet, and the Macro is run from within VB6, the timestamp of the Excel file does not change i.e. it appears the macro is not working, or though a message for overwriting is not displayed, it is defaulting to a 'No' I do not wish to overwrite the original file. This is not what I want.

Regards,

MoBen.
 
I believe that in the macro you can setwarnings = off


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top