Auto macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please I i'm not good to this so..........

I have this
Private Sub Workbook_Open()
Run (GetData_Example1)


End Sub
Is a macro i will have running every time i open the workbook

But this is not the way so if some one will answer me then please do it so i
can understand it.
Thank you

Alvin
 
Hi
there have you put this macro? It has to go in your workbook module!
 
Hi
and as Ron stated in your other thread it has to go in the workbook
module (called 'ThisWorkbook' in the VBA project bexplorer)
 
Hi again
Please see here:

This working:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
GetData_Example1
End Sub

This Working:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
GetData_Example1
End Sub

This not working:

Private Sub Workbook_Open()
GetData_Example1
End Sub

BEst regards alvin

"Ron de Bruin" skrev:
 
Hi
I know why it dosn't work
I open ecxel first and then i open the filw(workbook)
If i open the fil(worbook) whitout open excel first then is working

Thanks

Alvin


"Frank Kabel" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top