View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Have "Freeze Pane" button track current state

http://www.cpearson.com/excel/AppEvent.htm

--
Regards,
Tom Ogilvy


"Joe Sewell" wrote:

I've added the Freeze Panes button to a toolbar, but I'm disappointed
that it doesn't show the current state. While it does toggle between
Freeze and Unfreeze, I'd like it to show whether the current worksheet
has frozen panes or not.

In Word I can use application events to detect window & document
changes; it can be slow, but it works. Excel, though, doesn't propagate
worksheet events up to the application, or at least it doesn't seem to.
If there were an App_WorksheetActivate event, I could use it to update
the status of my toolbar button(s). There doesn't seem to be such a
beast, though, in Excel 2003. (That's what my place of work has
"standardized" on, so upgrading is not an option.)

Is there a better way -- or *any* way, for that matter -- to get a
Freeze Panes button to show whether panes are frozen or not? (Yes, I
know I can look for the split bar, but that isn't as obvious as looking
at a toolbar button.)