Hi All, Can you help please, I have taken out all the headings, ribbons, scroll bars etc to leave just the spread sheet (Read only) I use:-
Sub hide()
Sheet2.Visible = xlSheetHidden
Sheet3.Visible = xlSheetHidden
Sheet4.Visible = xlSheetHidden
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayOutline = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
ThisWorkbook.Save
End Sub
when on the screen it clears down the sheet and saves ( with no file tab ), HOWEVER, when i reopen the saved sheet the file tab comes back !!! so frustrating Can any one help? as i dont want any one to resave the sheet.
Many thanks in Anticipation
After days searching around the internet managed to find a solution to closing a workbook without a save and also with no file tab on re opening Excel 2010....
The vba is not efficient as I am newby to this, so if it can be tidied up, any advice would be appreciated....
The following is saved in THISWORKBOOK
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
Application.Quit
End Sub
Private Sub Workbook_Open()
Sheet2.Visible = xlSheetHidden
Sheet3.Visible = xlSheetHidden
Sheet4.Visible = xlSheetHidden
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayOutline = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
ActiveWorkbook.Saved = True
End Sub
I hope it works for you
Last edited by pleased2help; 2013-07-24 at 03:04 PM.
Bookmarks