Run a macro when a worksheet is executed?

R

raraujo

Do anybody knows how can I execute automaticaly a macro when a workshee
is opened.

Thanks

Rubens Araujo

(e-mail address removed)
 
M

mudraker

raraujo


there are 2 ways

1st in a normal module have a macro

sub Auto_Open

msgbox "Hi - From Auto Open Macro"

end sub


2nd method in the ThisWorkbook Module

Private Sub Workbook_Open()

Msgbox "Hi - From Workbook_Open event"

End Sub
 
R

raraujo

mudraker,

Please, could you explain how I insert this subrotines in the workshee
?

Thanks

Ruben
 

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

Top