PDA

View Full Version : Excel 2007 issue



d4vem
06-24-2009, 12:31 PM
Hi All,

I will try and simplify this issue.

Upon opening the Excel file I want to hide the worksheets, scrollbars, etc ,etc which is not a problem.The issue I have is to do with hiding the entire ribbon.

If I open the file utilising Excel direct or via Explorer then ribbon is hidden.

However if I use a VBS file to open the file the top of the excel app is missing. But if I run the following when the file is open I get the desired effect

Works when file is open / but not on Private Sub Workbook_open()

Sub Hide_Ribbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub

Sub Show_Ribbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub. ~Oorang

Could this be to do with xml within the new 2007 version?

Any help would be much appreciated