View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Foolproof way to trap Worksheet Change?

The problem with the hyperlink not firing the worksheet_activate was fixed in a
later version of excel (broken in xl2k, but works in xl2002, IIRC).

I'm not sure if that affected the web toolbar, though.



Nick wrote:

Is there any reliable way to detect when user switches worksheets?

My VBA needs to react when a user switches worksheets, and I have a set of
event catchers (Workbook_SheetSelectionChange, Worksheet_SelectionChange,
WorkSheet_Activate, WorkSheet_Deactivate) which I thought was foolproof.
Whether user switched sheets via my hyperlinks, used sheet tabs, or used the
Web toolbar, I got one of these events to trigger.

But user can start on sheet1, use Edit/GoTo to get to Sheet2, click an
option button, use Edit/GoTo to get back to sheet1, click a button all
without triggerring an event. I can trap more events with the option
buttons, but isn't there an easier way?


--

Dave Peterson