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: 4
Default Toggle calculation

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?



 
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
Toggle between Worksheets Jerry L Excel Discussion (Misc queries) 1 November 18th 08 04:49 PM
How do i setup a 'toggle' Tedwards Excel Discussion (Misc queries) 2 February 28th 06 09:11 AM
Toggle Button Dave_2k5 Excel Discussion (Misc queries) 2 September 1st 05 11:27 AM
Toggle Button Keri[_2_] Excel Programming 2 May 28th 04 04:58 PM
How to toggle Cesar Zapata[_2_] Excel Programming 3 November 15th 03 01:13 AM


All times are GMT +1. The time now is 07:17 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"