Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default making toggle button in xl menu



i need to method making the xl menu button of toggle button type using
macro(vba).
here is the code, it does not working.

Set oMenu = Application.CommandBars(1). _
Controls.Add(Type:=msoControlButtonToggle, Befo=1)
With oMenu
.Caption = "test"
.Style = msoButtonIconAndCaptionBelow
.BeginGroup = True
End With


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default making toggle button in xl menu

Why not just use the state property of a regular button (msoControlButton).
Thsi will show the button as being either depressed or not... (msoButtonUp or
msoButtonDown)

Application.CommandBars("ToolBarName").Controls("C ontrolName").State =
msoButtonDown

--
HTH...

Jim Thomlinson


"tom taol" wrote:



i need to method making the xl menu button of toggle button type using
macro(vba).
here is the code, it does not working.

Set oMenu = Application.CommandBars(1). _
Controls.Add(Type:=msoControlButtonToggle, Befo=1)
With oMenu
.Caption = "test"
.Style = msoButtonIconAndCaptionBelow
.BeginGroup = True
End With


*** Sent via Developersdex http://www.developersdex.com ***

Reply
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
Adding .xla button for Toggle Calculation Button Mike Excel Programming 5 August 19th 05 01:55 PM
How to create a toggle button on the menu? OKLover Excel Programming 4 July 10th 05 03:51 PM
Shortcut Menu With Toggle Control quartz[_2_] Excel Programming 0 February 10th 05 02:23 PM
Toggle Button Keri[_2_] Excel Programming 2 May 28th 04 04:58 PM
Toggle State on Custom Menu Devin McMahon Excel Programming 0 July 23rd 03 02:36 AM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"