Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Toggle CommandBarControls msoButtonDown/msoButtonUp

Hi guys

I have some toolbar buttons whose state toggles between msoButtonUp
and msoButtonDown depending on whether say, gridlines were displayed
or not.

I initialize these on Workbook_Open from PERSONAL.xls, and the code
for each executes each time a button is clicked. This all works fine.

What I can't work out, is if all workbooks are closed (and only
PERSONAL.xls remains open), how can I get the buttons to toggle to a
state I define (msoButtonUp)? None of the workbook events in
PERSONAL.xls seem to trigger when the last visible workbook closes.

Thanks in advance

Paul Martin
Melbourne, Australia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Toggle CommandBarControls msoButtonDown/msoButtonUp

Have you tried testing Workbooks.Count - it will be 1 if only Personal.xls
remains.

--

HTH

RP

"Paul Martin" wrote in message
om...
Hi guys

I have some toolbar buttons whose state toggles between msoButtonUp
and msoButtonDown depending on whether say, gridlines were displayed
or not.

I initialize these on Workbook_Open from PERSONAL.xls, and the code
for each executes each time a button is clicked. This all works fine.

What I can't work out, is if all workbooks are closed (and only
PERSONAL.xls remains open), how can I get the buttons to toggle to a
state I define (msoButtonUp)? None of the workbook events in
PERSONAL.xls seem to trigger when the last visible workbook closes.

Thanks in advance

Paul Martin
Melbourne, Australia



Reply
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
run-time error commandbarcontrols JennM Excel Discussion (Misc queries) 0 December 19th 08 05:43 PM
add of commandbarcontrols failed Peter Setting up and Configuration of Excel 5 February 14th 07 12:01 AM
HELP - 'Add' of object 'CommandBarControls' failed LAF Excel Discussion (Misc queries) 1 September 20th 05 01:53 AM
Method 'Add' of object 'CommandBarControls' failed LAF Excel Discussion (Misc queries) 0 September 12th 05 02:02 PM
Problem getting a msoButtonDown status [email protected] Excel Programming 0 November 17th 03 12:23 AM


All times are GMT +1. The time now is 09:47 AM.

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

About Us

"It's about Microsoft Excel"