workbook_open execute macro

  • Thread starter Thread starter ina
  • Start date Start date
I

ina

hello,

I would to open my macro and automatically execute my macro in the
sheet1 and another in sheet2

Private Sub Workbook_Open()

Sheets("Clients").GetInfo "John"
Sheets("Room29.GetInfoRoom

End Sub

But doesn't work?

Ina
 
Private Sub Workbook_Open()

Sheet1.GetInfo "John"
Sheet2.GetInfoRoom

End Sub
 
What means " method or data member not found" do you thing Do i need
set my GetInfo into private sub

Ina
 
it is ok and i have insert in each sheet the sub going there (getInfo
and GetInfoRoom ) and in the workbook I insert this code

Sub workbook_open()

Sheet1.GetInfo
Sheet2.GetInfoRoom

End Sub

the macro in sheet2 is executing in sheet1and I do not know why?
 
Sub workbook_open()

Sheet1.Activate
Sheet1.GetInfo
sheet2.Activate
Sheet2.GetInfoRoom

End Sub
 
Thank you a lot :D

and one more question when I can my file from a script (vbscript) the
macro is not been executed; Do I Need do something in the vba code or
vbscriptcode?

Ina
 
Unless you have security set to high or have your code disable macros, I
would expect the workbook_open event to fire if it is in the Thisworkbook
module.
 
yes i will check here ... but now my head blow off. Thank you a lot for
your advices

Ina
 

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