Skip to content
The Chat Archive
gpt-3.5-turbo-0301· OpenAI WildChat-4.8M (AI2)

I want to open a workbook in Excel 2010 without tabs or commands. How will I write this…

  1. User

    I want to open a workbook in Excel 2010 without tabs or commands. How will I write this VBA code

  2. Assistant

    Sub OpenWorkbookNoTabsCommands()

    Application.DisplayFullScreen = True
    Application.DisplayFormulaBar = False
    Application.DisplayStatusBar = False
    Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"
    
    Workbooks.Open Filename:="C:\Workbook.xlsx", ReadOnly:=True
    

    End Sub

    Note: This code will open the specified workbook in full screen mode without displaying tabs, the formula bar, the status bar, or the ribbon. It will also open the workbook as read-only. Adjust the file path and name to match the workbook you want to open.

  3. User

    will this affect other workbooks

  4. Assistant

    No, this code will only affect the workbook you are opening. Once you close the workbook or run a macro that returns Excel to its default view, the settings will be reset for any other workbooks that you have open or open in the future.