Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing the RECENTLY OPENED submenu item

Hello,

PLEASE HELP!!

I am trying to adjust the look of the menus in an xls workbook using
the following VBA script:-

With CommandBars("Worksheet Menu Bar").Controls("File")
.Controls("New...").Visible = False
.Controls("Open...").Visible = False
.Controls("Save As...").Visible = False
BLAH BLAH etc

However, I cannot remove the list of recently opened files because i do
not know what its 'name' is. I do know its ID is 831 but I am
struggling to write a VBA statement that likes using ID numbers instead
of names.

Any answers would be greatly appreciated.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Removing the RECENTLY OPENED submenu item

James,

With Application
.DisplayRecentFiles = False
.RecentFiles.Maximum = 0
End With

HTH,
Bernie
Excel MVP


"james" wrote in message ...
Hello,

PLEASE HELP!!

I am trying to adjust the look of the menus in an xls workbook using
the following VBA script:-

With CommandBars("Worksheet Menu Bar").Controls("File")
Controls("New...").Visible = False
Controls("Open...").Visible = False
Controls("Save As...").Visible = False
BLAH BLAH etc

However, I cannot remove the list of recently opened files because i do
not know what its 'name' is. I do know its ID is 831 but I am
struggling to write a VBA statement that likes using ID numbers instead
of names.

Any answers would be greatly appreciated.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Removing the RECENTLY OPENED submenu item

Sub ClearMenu()
Dim x As CommandBarControl

For Each x In CommandBars(1).Controls(1).Controls
If x.ID = 831 Then x.Visible = false
Next
End Sub

You'll probably want to use the names, as you did in your example code; I
got tired of retyping it in the immediate window before I actually wrote the
sub.

--
HTH -

-Frank
Microsoft Excel MVP
Dolphin Technology Corp.
http://vbapro.com






"james" wrote in message
...
Hello,

PLEASE HELP!!

I am trying to adjust the look of the menus in an xls workbook using
the following VBA script:-

With CommandBars("Worksheet Menu Bar").Controls("File")
Controls("New...").Visible = False
Controls("Open...").Visible = False
Controls("Save As...").Visible = False
BLAH BLAH etc

However, I cannot remove the list of recently opened files because i do
not know what its 'name' is. I do know its ID is 831 but I am
struggling to write a VBA statement that likes using ID numbers instead
of names.

Any answers would be greatly appreciated.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.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
how do I remove an item from the recently used files list Sandy MCP Excel Discussion (Misc queries) 2 April 15th 08 04:20 PM
How to add a submenu to a submenu? tan New Users to Excel 6 October 4th 06 09:17 AM
Removing a subtotal from an insert item in a pivot table dianeha Excel Discussion (Misc queries) 2 July 21st 06 10:33 PM
Customise the number of recently opened docs listed in File drop Wendy Setting up and Configuration of Excel 1 June 1st 06 10:25 AM
XML submenu SC Excel Discussion (Misc queries) 1 April 19th 06 09:57 PM


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