Shell Command

fulltime

Registered User.
Local time
Today, 16:36
Joined
Mar 24, 2006
Messages
56
Hi all,

From my MS Access Form, i used shell command to open a file in MS Excel. however now, i want to run a macro in the MS excel file tat i have opened..

Any specific commands to execute macros?

Thks
FT :)
 
why do not put in excel code to run on open?
Private Sub Workbook_Open()
<code>
End Sub
 
goppo said:
why do not put in excel code to run on open?
Private Sub Workbook_Open()
<code>
End Sub


Hi, what do you mean by putting the excel code to run on open? do i put the above codes inside my VBA for access? As for the <code>, it shld be the lines of macros codes that i need to run?

Thks for ur reply
 
opent excel file and press Alt+F11
you will see what i mean
 

Attachments

goppo said:
opent excel file and press Alt+F11
you will see what i mean

Thks for the sample, i actually generated a new file, eg, NEW.xls from access, then i will export n open the NEW.xls in Excel. I wan the macro to run automatically once the file opens in Excel. Since this file is newly generated, I cant possibly have codes written in it.. I can onli call macros that was written on other files, eg MAIN.XLS to be run on this file..

I tried putting the open_workbook () in MS Access, but it gives an Sub or Function not defined.

Thks FT:)
 

Users who are viewing this thread

Back
Top Bottom