Workbook and Worksheet Events

G

Guest

Excel 2002-2003. What events may be trapped in VBA for an Excel workbook and
its worksheets? For instance, I have an event routine:

Private Sub Workbook_Open()

Which runs when the workbook is opened. That is the only event I know the
name of. Are there events for when I change from sheet to sheet? Are there
events when a particular sheet is activated (selected)? Also, I am trying to
set up a menu with control buttons, etc. I want to hide the cursor (box) so
that I do not have a black box outline show up on the page. I use
Sheets(<sheetname>).ScrollArea="E7" to hide the "cursor" behind a control.
Is there a better way to do this? Thanks for the help.
 
B

Bob Phillips

Doug,

Go into a worksheet module, select Worksheet from the left dropdown and all
events associated with it will show in the right dropdown.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

Don Guillett

Have you looked within the controls.
sheet tab>view code>left window>worksheet>right window see events
 
G

Guest

Dear Bob:

Your answer was just like showing the baby how to get his own milk and fill
his own bottle. I'm gonna be real dangerous with this new found power! God
bless and thanks.

Bob Phillips said:
Doug,

Go into a worksheet module, select Worksheet from the left dropdown and all
events associated with it will show in the right dropdown.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

Dear Don:

Its just like I told Bob: I have been doing VBA programming (hacking) for
quite some time now and had NEVER used this feature. I feel like the guy who
was struggling for hours to cut down a tree with a chainsaw, and who had
someone come up and start the chainsaw for the first time. I've been cutting
without ever starting the chainsaw! And I ain't no dumb hillbilly neither.
Well I do live in the hills and some people call me "Billy," but other than
that . . . Thanks and God bless.

Don Guillett said:
Have you looked within the controls.
sheet tab>view code>left window>worksheet>right window see events
 
B

Bob Phillips

A hungry baby, with a bottle and a cow ... beware :)

The same feature can be found in ThisWorkbook, with the Workbook object, in
userforms with any of the controls included, and with classes. Beware the
power :)

--

HTH

RP
(remove nothere from the email address if mailing direct)


Chaplain Doug said:
Dear Bob:

Your answer was just like showing the baby how to get his own milk and fill
his own bottle. I'm gonna be real dangerous with this new found power! God
bless and thanks.
 
T

Tom Ogilvy

Also, see Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

Chaplain Doug said:
Dear Don:

Its just like I told Bob: I have been doing VBA programming (hacking) for
quite some time now and had NEVER used this feature. I feel like the guy who
was struggling for hours to cut down a tree with a chainsaw, and who had
someone come up and start the chainsaw for the first time. I've been cutting
without ever starting the chainsaw! And I ain't no dumb hillbilly neither.
Well I do live in the hills and some people call me "Billy," but other than
that . . . Thanks and God bless.
 

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