Toggle fullscreen with F11

This evening I needed to create a flowchart. Excel is my favorite application to do this. However the screenresolution on my notebook is a bit less then my computer at work, so I wondered how I could view my information better. Of course you can set the zoom to less then 100% but then I couldn't read the text anymore.

So I decided to use the fullscreen view in Excel. That way only the sheet and the main menubar are visible. I've also turned of the row and column headings. I used ASAP Utilities to show the flowchart toolbars and had all the space I needed.

But then I realized that quickly switching between fullscreen and normal view could not be done by a shortcut key. In most internet browsers you can use the F11 key to do this. So I choose to make my own F11 action in Excel. (By default the F11 key inserts a chart sheet in Excel and so will Alt+F1).

To be able to use the key F11 to toggle between fullscreen, I added the following code to my workbook:

The following code will toggle between fullscreen:

Sub sbToggleFullscreen()
  If Application.DisplayFullScreen Then
    Application.DisplayFullScreen = False
  Else
    Application.DisplayFullScreen = True
    ' to not show the fullscreen commandbar
    ' uncomment the following line
    ' Application.CommandBars("Full Screen").Visible = False
  End If
End Sub


Assign the shortcutkey F11 when the file is opened:

Sub auto_open()
' assign our own macro to the F11 key:
  Application.OnKey "{F11}", "sbToggleFullscreen"
End Sub

Set the key F11 back to default when the file is closed:

Sub auto_close()
' set the F11 action back to default
  Application.OnKey "{F11}"
End Sub

Oh, to use the flowchart in my Word document, I use ASAP Utilities to export the selection as a GIF-image file and I then import the picture in my document.

Comments are closed.

Pinterest