F
FJDx
I have assigned the following macro to a button on my Excel 2002
toolbar:
Sub ToggleCalcMode()
Dim nState As Long
Dim sMode As String
With Application
If .Calculation = xlAutomatic Then
.Calculation = xlManual
nState = msoButtonDown
sMode = "Manual"
Caption = "Manual"
Else
.Calculation = xlAutomatic
nState = msoButtonUp
sMode = "Automatic"
Caption = "Auto"
End If
End With
End Sub
I selected an icon from 'Change button image'. How can I change the
picture of the toolbar button depending on whether I have it set to
Automatic or Manual?
toolbar:
Sub ToggleCalcMode()
Dim nState As Long
Dim sMode As String
With Application
If .Calculation = xlAutomatic Then
.Calculation = xlManual
nState = msoButtonDown
sMode = "Manual"
Caption = "Manual"
Else
.Calculation = xlAutomatic
nState = msoButtonUp
sMode = "Automatic"
Caption = "Auto"
End If
End With
End Sub
I selected an icon from 'Change button image'. How can I change the
picture of the toolbar button depending on whether I have it set to
Automatic or Manual?