Results 1 to 4 of 4

VBA to hide ribbon (not toolbar) on open workbook, and show on close workboo.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-30-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2013
    Posts
    177

    VBA to hide ribbon (not toolbar) on open workbook, and show on close workboo.

    Hello all,
    I am trying to VBA to hide the ribbon on opening the workbook, and show on closing. I don't want to hide the toolbar. Ideally I only want it to happen on the workbook I am creating. I currently have:

    Private Sub Workbook_Open()
    SendKeys "^{F1}"
    End Sub
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    SendKeys "^{F1}"
    End Sub
    But this doesn't show the ribbon on closing, and doesn't only apply it to this workbook.

    I'd also prefer it if the code didn't use the F1 toggle, but actually hid the ribbon.

    Cheers

    Luke
    Last edited by arlu1201; 08-03-2012 at 04:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1