Stripping down excel

G

Gordon

Hi...

I've just moved to excel 2007 and am having difficulty moving to new VB
code. Up until 2003 the code below was great for removing all editable
options. Now however, it only half works.

Can anyone convert this into a 1997 - 2007 compatable code?

Private Sub auto_open()
CommandBars("Worksheet Menu Bar").Enabled = False
Application.DisplayFullScreen = False
Sheets("SETUP").Select
ActiveWindow.Caption = Sheets("SETUP").Range("J6")
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
Application.DisplayStatusBar = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
ActiveWindow.DisplayWorkbookTabs = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Chart").Visible = False
Application.CommandBars("Forms").Visible = False
Application.CommandBars("Web").Visible = False
Application.CommandBars("Reviewing").Visible = False
Application.CommandBars("Visual Basic").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.CommandBars("web").Visible = False
Application.CommandBars("Picture").Visible = False
Application.CommandBars("PivotTable").Visible = False
Application.CommandBars("CELL").Enabled = False
Application.CommandBars("Visual Basic").Enabled = False
MenuBars(xlWorksheet).Menus("Data").Enabled = True
MenuBars(xlWorksheet).Menus("Help").Enabled = True
MenuBars(xlWorksheet).Menus("Edit").Enabled = True
MenuBars(xlWorksheet).Menus("Format").Enabled = True
MenuBars(xlWorksheet).Menus("Insert").Enabled = True
MenuBars(xlWorksheet).Menus("Window").Enabled = True
MenuBars(xlWorksheet).Menus("Help").Enabled = True
MenuBars(xlWorksheet).Menus("Tools").Enabled = True
MenuBars(xlWorksheet).Menus("View").Enabled = True
Application.CommandBars("Ply").Enabled = False

Cheers

Gordon
 
J

Jim Cone

Re: "why I'm not moving up to 2007"
amen to that.
'--
For what it's worth, a recent magazine review of the next Windows release
mentioned that it will use the ribbon. Words fail me.
--
Jim Cone
Portland, Oregon USA



"Bernie Deitrick"
<deitbe @ consumer dot org>
wrote in message
Gordon,
That's exactly why I'm not moving up to 2007 - Commandbars don't exist in XL2007 anymore - it now
uses the ribbon.
http://www.rondebruin.nl/ribbon.htm

HTH,
Bernie
MS Excel MVP


"Gordon"
wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top