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

excell 2000 macro on_open

Status
Not open for further replies.

RBE

Programmer
May 25, 2000
72
US
I need a macro that will be placed in a personal.xls macro file and will check the name of the workbooks opened and if it matches dgltest.xls it will run a macro (dgltest) on it. This is a file that will open in excell from access. Access replaces this file every time it opens so I cannot put the macro directly on the dgltest workbook. Excell will most likly already be open when access brings up the file, so excell will need to check the workbook name and then run the assoicated macro. I can get it to run a macro on Auto_open. But that only runs when excell opens and never again until the program closes and reopens. I need the macro to be running the whole time excell is open. And then, I can't get it to look for a spicific file name. Keep getting object errors of various sorts(depending on the code I use). Is what I want possible and if it is how can I get this done. At the very least can some one tell me how to get a macro to look for a filename in an if statement within VBA. Thanks for all the help.
RBE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top