Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Button in a Toolbar
Can anyone tell me how to create a toggle button in a Toolbar in Excel
VBA? Thanks, Amit |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Button in a Toolbar
Here is an example that uses click to set the calculation mode to manual,
shift-click to automatic, and changes the tooltiptext to show whixh mode it is in. Sub SetCalculateMode() 'Shifted is automatic, unshifted is manual Dim sMode As String Dim nState As Long If GetKeyState(vkShift) < 0 Then Application.Calculation = xlAutomatic sMode = "Automatic" nState = msoButtonDown Else Application.Calculation = xlManual sMode = "Manual" nState = msoButtonUp End If With Application.CommandBars.ActionControl .TooltipText = "Calculation mode is " & sMode .State = nState End With End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "amitmohantybbsr" wrote in message ups.com... Can anyone tell me how to create a toggle button in a Toolbar in Excel VBA? Thanks, Amit |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Button in a Toolbar
Thanks for your reply. I will try to implement it.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Toolbar Toggle | Excel Discussion (Misc queries) | |||
Auto Filter Toolbar Button Does not Toggle | Excel Discussion (Misc queries) | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
Assign ShortCut-key To Toggle VBA-toolbar? | Excel Programming | |||
Use Toolbar Button to Toggle Addin | Excel Programming |