#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default menu


Application.CommandBars("Sheet").Controls(2).Copy
Bar:=Application.CommandBars(1), Befo=11, caption:="shtHide",
style:="OnlyText"

But, the code doesn't work.
How can I?


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default menu

What exactly are you trying to do? You seem to be mixing up sheets and
commandbars here.

Can you explain your goal a little more clearly?

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca

x taol wrote:
Application.CommandBars("Sheet").Controls(2).Copy
Bar:=Application.CommandBars(1), Befo=11, caption:="shtHide",
style:="OnlyText"

But, the code doesn't work.
How can I?


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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default menu

With Application
.CommandBars("Sheet").Controls(2).Copy .CommandBars(1), 4
End With

this code work well.

but i want to change the name with "shtHid" using VBA.

*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default menu

Try this:

With Application
.CommandBars("Sheet").Controls(2).Copy .CommandBars(1), 4
.CommandBars(1).Controls(4).Caption = "shtHid"
End With

Is that what you meant?

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca

x taol wrote:
With Application
.CommandBars("Sheet").Controls(2).Copy .CommandBars(1), 4
End With

this code work well.

but i want to change the name with "shtHid" using VBA.

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default menu

thank you very much ken,
by the way,,

Set mb = Application.CommandBars(1)
With mb.Controls
'all show filter
.Add Type:=msoControlButton, ID:=900, Befo=11
end with

I want to change the name with "all_sho_filt" and set always only text.

*** 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
Drop dwn menu. Formula to count selection frm menu in anoth cell? ggoldber Excel Worksheet Functions 1 June 4th 08 02:21 PM
filter dropdown menu so 2nd drop menu is customized menugal Excel Worksheet Functions 1 September 4th 07 05:25 PM
Adding Sub Menu Item to Current Custom Menu Renato Excel Programming 2 December 19th 05 12:48 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM


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