Question about sub Workbook_Open()

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

Hello

I have figured out that I can put a subroutine in the VBA
associated with my Excel Workbook, that will run each time
the Workbook is opened. A sample of the code is shown
below.

Private Sub Workbook_Open()

MsgBox "The workbook has been opened."

End Sub

This could be a helpful tool for me to be able to add
reminders and informational things to a workbook. I need
to know more about subroutines that will operate on
workbook and sheet events (ie: open) but cannot find them
in the documentation. It is likely I'm not searching with
the correct terminology. Do you have any suggestions
about how I can learn more about this topic?

Thank you.

Keith
 
Keith, have a look here http://www.cpearson.com/excel/events.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
This could be a helpful tool for me to be able to add
reminders and informational things to a workbook. I need
to know more about subroutines that will operate on
workbook and sheet events (ie: open) but cannot find them
in the documentation. It is likely I'm not searching with
the correct terminology. Do you have any suggestions
about how I can learn more about this topic?

In VB editor project explorer window double click any of the sheets, then
in the editor window select Worksheet in the left dropdown box. The right
drop down
list box lists some events associated with worsheet, like SelectionChange,
Activate, Change.
The go to answer wizard in your VB help file look for 'SeletionChange event'
etc.

The same routine with Workbook associated events - just double click
ThisWorkbook in
project explorer window.
 

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