Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Deleting a Menu Bar

Hello Everyone!

A spreadsheet that I've used has set up a new drop down
menu at the top of my Excel application. (Like File, Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the name
of the one I don't want. But everything on here seems to
refer to adding and deleting a specific name that you
already know!

If anyone could help I'd be very grateful

TIA

Sxx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Deleting a Menu Bar

I have some examples of commandbars on my website.

If you've set the Tag property on a control, you can use the .Find method of
Controls to find using Tag parameter.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Sophie" wrote in message
...
Hello Everyone!

A spreadsheet that I've used has set up a new drop down
menu at the top of my Excel application. (Like File, Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the name
of the one I don't want. But everything on here seems to
refer to adding and deleting a specific name that you
already know!

If anyone could help I'd be very grateful

TIA

Sxx



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Deleting a Menu Bar

Hi Rob

Thanks for that. With your help I managed to put together
the code below. But when I ran it displayed the Gotcha!
and deleted the dropdown options from the menu I wanted
to remove, but the header is still there!!

Sub ListAllMenubars()

Dim bar As CommandBar

For Each bar In Application.CommandBars

ActiveCell.Offset(1, 0).Select
ActiveCell.value = bar.Name

If bar.Name = "Financial &Manager" Then
MsgBox "Gotcha!"
bar.Delete
End If
Next

End Sub

-----Original Message-----
I have some examples of commandbars on my website.

If you've set the Tag property on a control, you can use

the .Find method of
Controls to find using Tag parameter.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Sophie" wrote in

message
...
Hello Everyone!

A spreadsheet that I've used has set up a new drop down
menu at the top of my Excel application. (Like File,

Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the name
of the one I don't want. But everything on here seems

to
refer to adding and deleting a specific name that you
already know!

If anyone could help I'd be very grateful

TIA

Sxx



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Deleting a Menu Bar

maybe just:

On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("Financial &Manager").Delete
On Error GoTo 0

(if I understood correctly)



wrote:

Hi Rob

Thanks for that. With your help I managed to put together
the code below. But when I ran it displayed the Gotcha!
and deleted the dropdown options from the menu I wanted
to remove, but the header is still there!!

Sub ListAllMenubars()

Dim bar As CommandBar

For Each bar In Application.CommandBars

ActiveCell.Offset(1, 0).Select
ActiveCell.value = bar.Name

If bar.Name = "Financial &Manager" Then
MsgBox "Gotcha!"
bar.Delete
End If
Next

End Sub

-----Original Message-----
I have some examples of commandbars on my website.

If you've set the Tag property on a control, you can use

the .Find method of
Controls to find using Tag parameter.

--
Rob van Gelder -
http://www.vangelder.co.nz/excel


"Sophie" wrote in

message
...
Hello Everyone!

A spreadsheet that I've used has set up a new drop down
menu at the top of my Excel application. (Like File,

Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the name
of the one I don't want. But everything on here seems

to
refer to adding and deleting a specific name that you
already know!

If anyone could help I'd be very grateful

TIA

Sxx



.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Deleting a Menu Bar

Not sure what's going on...

Code looks like it should delete the commandbar "Financial &Manager"
How are you triggering ListAllMenubars to run?


--
Rob van Gelder - http://www.vangelder.co.nz/excel


wrote in message
...
Hi Rob

Thanks for that. With your help I managed to put together
the code below. But when I ran it displayed the Gotcha!
and deleted the dropdown options from the menu I wanted
to remove, but the header is still there!!

Sub ListAllMenubars()

Dim bar As CommandBar

For Each bar In Application.CommandBars

ActiveCell.Offset(1, 0).Select
ActiveCell.value = bar.Name

If bar.Name = "Financial &Manager" Then
MsgBox "Gotcha!"
bar.Delete
End If
Next

End Sub

-----Original Message-----
I have some examples of commandbars on my website.

If you've set the Tag property on a control, you can use

the .Find method of
Controls to find using Tag parameter.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Sophie" wrote in

message
...
Hello Everyone!

A spreadsheet that I've used has set up a new drop down
menu at the top of my Excel application. (Like File,

Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the name
of the one I don't want. But everything on here seems

to
refer to adding and deleting a specific name that you
already know!

If anyone could help I'd be very grateful

TIA

Sxx



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Deleting a Menu Bar

Hi Dave

That's it exactly!

Thank you very much guys

S


-----Original Message-----
maybe just:

On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("Financial &Manager").Delete
On Error GoTo 0

(if I understood correctly)



wrote:

Hi Rob

Thanks for that. With your help I managed to put

together
the code below. But when I ran it displayed the Gotcha!
and deleted the dropdown options from the menu I wanted
to remove, but the header is still there!!

Sub ListAllMenubars()

Dim bar As CommandBar

For Each bar In Application.CommandBars

ActiveCell.Offset(1, 0).Select
ActiveCell.value = bar.Name

If bar.Name = "Financial &Manager" Then
MsgBox "Gotcha!"
bar.Delete
End If
Next

End Sub

-----Original Message-----
I have some examples of commandbars on my website.

If you've set the Tag property on a control, you can

use
the .Find method of
Controls to find using Tag parameter.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Sophie" wrote

in
message
...
Hello Everyone!

A spreadsheet that I've used has set up a new drop

down
menu at the top of my Excel application. (Like File,

Edit
etc). Now I want to get rid of it.

I've had a good look through the postings on here

and
can't find a way. I think I need to somehow list all
the ??msoControlDropdown?? options then delete the

name
of the one I don't want. But everything on here

seems
to
refer to adding and deleting a specific name that

you
already know!

If anyone could help I'd be very grateful

TIA

Sxx



.


--

Dave Peterson

.

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
Deleting Headers and Footers that are in the drop down Menu? Lisa Excel Discussion (Misc queries) 1 March 5th 07 06:33 PM
Deleting an otpion on the drop down menu on a pivot table Accountant Williams Excel Discussion (Misc queries) 5 September 28th 05 12:28 PM
How do I get Goal Seek back after deleting it from the Tools menu. mdamsgaard Excel Discussion (Misc queries) 0 March 22nd 05 07:17 AM
Deleting custom Commands from File Menu are nor saved next time w. EXCEL CUstomization Excel Worksheet Functions 3 December 7th 04 01:46 AM
Problems deleting custom menu = double entries BenD Excel Programming 2 November 3rd 03 11:14 AM


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