automation of sub

J

Jim

I posted this question on the General Board, but I was unable to obtain a
workable answer, can anyone on this board help?

Thanks,

Jim

original post>>>

Response Provided:
From workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the
left treeview search for the workbook name and click on + to expand it.
Within that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and check out the drop downs for the below event

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
'call your procedure here
End Sub


Result:

Thank you for your reply, however this event is not shown in the drop down
box. The events listed begin with AcceptLabelsInFormulas. Is it possible
that I
may be looking in the incorrect drop down box?

Jim
 
M

Mike H

Jim

There are 2 events you could use.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)

or

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)

Mike
 
T

Tom Hutchins

Please don't multi-post the same question. I replied to your other post a few
minutes ago.

Hutch
 

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