Hello,
Need to know how to run a macro / module automatically when I open my worksheet. I used below code but it wont run, any idea?
Thanks.
Pasi
'Private Sub Workbook_Open() Date call myMacro End Sub
Hello,
Need to know how to run a macro / module automatically when I open my worksheet. I used below code but it wont run, any idea?
Thanks.
Pasi
'Private Sub Workbook_Open() Date call myMacro End Sub
Last edited by Aussiebear; 01-31-2014 at 06:39 PM. Reason: enclosed code within tags
I'm sure your meant to have the code in this section.
HI Ashley,
Well I have an personal.xlsm and all my modules are there. DO I need to save it to "this workbook"?
I try to save it in "this work book"but its telling me to have to save it in a macro enabled file and that's my personal.xlsm .?
I presume you'll only be running this particular macro on one workbook each time you open it?
If that's the case, open that workbook, and save the macro in "ThisWorkbook" and then SAVE the file as XLSM format.
Then each time you open that workbook your macro will run, and presumably it will be calling a macro that is saved in your personal.xlsm file.
error.jpg
Ok here is what I am getting I save the file as xlsm??
OK, you can't just call a macro like that... Because it's looking for the macro FindDuplicates within Book2.xlsm, which doesn't exist.
So you need to call it from another workbook.
Try doing this:
Instead of Call FindDuplicatesApplication.Run "PERSONAL.XLSB!FindDuplicates"
No its not working?? not sure whats going on? when I tried to save it itgave me msg that it can not be saved in a macro-free workbook, you need to save it in a macro enabled file and I did and now its not working?
hmm??
OK Got it to work... thanks!