Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Delete MenuItem

I try to delete the "Chart" subMenu item in the "Insert" menu item on the
main menu file of Excel with the following commands

Sub DeleteIt()
MenuBars(xlWorksheet).Menus("Insert").MenuItems("C hart").Delete
End Sub

But i get "Applicatin defined error message

The procedure works fine with other menu items.

Please help...

Avi

www.avibenita.com


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Delete MenuItem

Off the top of my head I think you need "Chart..." instead of "Chart". Chart
brings up a wizard/form so it is "Chart..." (dot dot dot is Microsofts way of
saying that the button will bring up a form asking for more info) in the
menu.
--
HTH...

Jim Thomlinson


"Avi" wrote:

I try to delete the "Chart" subMenu item in the "Insert" menu item on the
main menu file of Excel with the following commands

Sub DeleteIt()
MenuBars(xlWorksheet).Menus("Insert").MenuItems("C hart").Delete
End Sub

But i get "Applicatin defined error message

The procedure works fine with other menu items.

Please help...

Avi

www.avibenita.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Delete MenuItem

This worked ok for me in xl2003 (xl97+).

Application.CommandBars("Chart Menu Bar") _
.Controls("Insert").Controls("Chart...").Delete

Are you still using xl95 (when menubars() had to be used.)



Avi wrote:

I try to delete the "Chart" subMenu item in the "Insert" menu item on the
main menu file of Excel with the following commands

Sub DeleteIt()
MenuBars(xlWorksheet).Menus("Insert").MenuItems("C hart").Delete
End Sub

But i get "Applicatin defined error message

The procedure works fine with other menu items.

Please help...

Avi

www.avibenita.com


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Delete MenuItem

Thanks so much
Works perfectly!!!!!!!!!!!


Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com
"Jim Thomlinson" wrote in message
...
Off the top of my head I think you need "Chart..." instead of "Chart".
Chart
brings up a wizard/form so it is "Chart..." (dot dot dot is Microsofts way
of
saying that the button will bring up a form asking for more info) in the
menu.
--
HTH...

Jim Thomlinson


"Avi" wrote:

I try to delete the "Chart" subMenu item in the "Insert" menu item on the
main menu file of Excel with the following commands

Sub DeleteIt()
MenuBars(xlWorksheet).Menus("Insert").MenuItems("C hart").Delete
End Sub

But i get "Applicatin defined error message

The procedure works fine with other menu items.

Please help...

Avi

www.avibenita.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
MenuItem.FaceID OkieViking Excel Programming 1 January 23rd 05 12:51 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM
VBE Custom menuitem not calling OnAction macro R Avery Excel Programming 4 July 13th 04 10:39 PM
Calling Sub with Parameter from Menuitem R Avery Excel Programming 2 January 30th 04 09:16 PM
Getting the Label or Caption of MenuItem Selected Brian Stigler Excel Programming 1 January 22nd 04 04:48 PM


All times are GMT +1. The time now is 04:47 AM.

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"