ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete menu (https://www.excelbanter.com/excel-programming/307651-delete-menu.html)

Todd huttenstine

Delete menu
 
Hey guys

I have a menu called "SMS Functions" on the menu toolbar
at the the top of Excel. Its next to the "Help" menu.

How do I programmatically delete this menu item?


Thank you
Todd Huttenstine

Tom Ogilvy

Delete menu
 
application.CommandBars("Worksheet Menu Bar").Controls("SMS
Functions").Delete

--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
...
Hey guys

I have a menu called "SMS Functions" on the menu toolbar
at the the top of Excel. Its next to the "Help" menu.

How do I programmatically delete this menu item?


Thank you
Todd Huttenstine




Todd huttenstine

Delete menu
 
Thank you

-----Original Message-----
application.CommandBars("Worksheet Menu Bar").Controls

("SMS
Functions").Delete

--
Regards,
Tom Ogilvy

"Todd Huttenstine"

wrote in message
...
Hey guys

I have a menu called "SMS Functions" on the menu toolbar
at the the top of Excel. Its next to the "Help" menu.

How do I programmatically delete this menu item?


Thank you
Todd Huttenstine



.


Soo Cheon Jheong[_2_]

Delete menu
 
Todd,

Try
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub TEST()

Dim CTL As CommandBarControl
For Each CTL In Application.CommandBars(1).Controls
If Application.Trim(CTL.Caption) = "SMS Functions" Then
CTL.Delete
End If
Next

End Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -


--
Regards,
Soo Cheon Jheong
_ _
^вп^
--






All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com