Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Stripping down excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Stripping down excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Stripping down excel

"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
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
Excel data stripping Steve Moss Excel Discussion (Misc queries) 5 January 20th 09 12:05 PM
Excel 2003 stripping out line feeds PJ Excel Programming 3 May 6th 08 10:42 PM
Stripping HTML tags from excel maunder Excel Programming 3 January 22nd 08 03:53 PM
Stripping Selective Data from .CSV file to Excel w/VBA [email protected] Excel Programming 0 June 5th 07 11:12 PM
Stop Excel from stripping out leading zeros when saving as CSV MattM Excel Discussion (Misc queries) 4 June 26th 06 11:35 AM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"