LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Problem setting the State of a custom Toolbar button

I have created a number of custom toolbar buttons on a custom
toolbar. Some of these are toggle buttons and I can set their state
(ie, msoButtonDown or msoButtonUp). One of these, however, is not
responding and the State doesn't change. The code is below in full,
and any suggestions are appreciated.

Thanks in advance

Paul Martin
Melbourne, Australia


Public Sub ToggleCalcMode()
With Application
.Calculation = IIf(.Calculation = xlCalculationManual, _
xlCalculationAutomatic,
xlCalculationManual)
MsgBox "Excel is in " & IIf(.Calculation =
xlCalculationManual, "Manual", "Automatic") _
& " calc mode"

CommandBars(CUSTOM_TOOLBAR).Controls("Toggle Calculation
Mode").State = _
IIf(.Calculation = xlCalculationAutomatic, msoButtonDown,
msoButtonUp)
End With
End Sub
 
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
adding custom images to a button on custom toolbar Mousam Excel Programming 1 July 13th 07 04:28 PM
Custom button on toolbar Jack Excel Programming 1 February 7th 06 09:09 PM
custom toolbar button questions Gary Keramidas Excel Programming 8 October 30th 05 02:21 AM
Delete a custom button by holding down the ALT key and dragging the button off the toolbar Stephen[_8_] Excel Programming 0 April 4th 04 02:22 PM
Can't delete custom button and toolbar Ron de Bruin Excel Programming 1 March 1st 04 09:46 PM


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

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"