MrExcel Publishing
Your One Stop for Excel Tips & Solutions

run macro question

Posted by Mark on March 22, 2001 7:58 AM

Could you explain what is meant by "RUN " .....this macro that has this line: ActiveWorkbook.Windows(1).Caption = ActiveWorkbook.FullName

Thank you

Posted by Dave Hawley on March 22, 2001 11:36 PM

Hi Mark

The word "Run" in VBA simply tells it to execute the macro whos name follows the word e.g.
Run "MyMacro"
would simply run the macro called MyMacro.


OzGrid Business Applications

Posted by Mark on March 23, 2001 3:54 AM

where do I enter the commands ?

Thank you Dave, I guess the better question is exactly where and how do I enter the commands..ActiveWorkbook.Windows(1).Caption = ActiveWorkbook.FullName.

Also would this work if create in the blank wookbook template to work with every new workbook ?

Thanks again

Posted by Dave Hawley on March 24, 2001 1:53 AM

Re: where do I enter the commands ?

Hi Mark

Mark, in your Template, right click on the sheet picture, top left next to "File" and select "View Code" then paste in this code.

Private Sub Workbook_Open()
ActiveWorkbook.Windows(1).Caption = ActiveWorkbook.FullName
End Sub


OzGrid Business Applications