view code in excel sheets

  • Thread starter Thread starter jim27
  • Start date Start date
J

jim27

Hi all

When you want to run a macro for a certain sheet continously you righ
clight the sheet tab and then click on view code and insert the macr
there.

Is there an equivalent for word documents and in fact is it possible t
have a macro run when ever word opens?

Thank
 
Open a word document

macros for word works exactly same as excel

goto -> tools->macro->visual basic editor, double click "this document
below project (file name)

paste this code

Private Sub Document_Open()
MsgBox "document opened"
End Su
 

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