P
Paul Martin
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
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