View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dan dungan dan dungan is offline
external usenet poster
 
Posts: 411
Default Command Button That Will Toggle

Is this what you seek?

Private Sub CommandButton1_Click()
If Application.Calculation = xlCalculationAutomatic Then
CommandButton1.Caption = "AUTO"
ElseIf Application.Calculation = xlCalculationManual Then
CommandButton1.Caption = "MANUAL"
End If
End Sub

Dan

On Oct 26, 1:26 pm, Paige wrote:
Need to create a command button that when first created (when a workbook is
opened), it checks the calculation state and if calc is set to auto, the
button caption will say "AUTO"; if calc is set to manual, the button caption
will say "MANUAL". Then the user should be able to hit the button to toggle
back and forth between auto and manual calculation, with the button caption
changing appropriately each time. I only know the basics of creating a
button....and have not been able to figure this out. Can someone help me
with this please?