LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default automation of sub

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
"Jim" wrote:

We have a workbook with multiple worksheets. I have written a procedure
which checks for data outside of a specified range on the worksheet.

Is it possible to have this procedure run automatically whenever a user
activates a new worksheet in the workbook? I realize that the procedure can
be tied to a key combination, or command button, but that requires input from
the user. For this application, we need to automate the process.

Thanks,

Jim


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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation Emine Excel Programming 0 January 21st 09 03:46 PM
Supressing the ctrl-c and other keys during word automation in automation apondu Excel Programming 0 July 19th 07 10:10 PM
Automation Chris Excel Programming 1 March 8th 05 06:55 PM
Automation Rupal Vaibhav Excel Programming 0 December 12th 03 03:47 PM
Automation [email protected] Excel Programming 0 December 12th 03 02:52 PM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"