Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"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 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel data stripping | Excel Discussion (Misc queries) | |||
Excel 2003 stripping out line feeds | Excel Programming | |||
Stripping HTML tags from excel | Excel Programming | |||
Stripping Selective Data from .CSV file to Excel w/VBA | Excel Programming | |||
Stop Excel from stripping out leading zeros when saving as CSV | Excel Discussion (Misc queries) |