Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Make sure to put this inside "ThisWorkbook" NOT a Module!

Sub Workbook_Open()

  With Application
    .OnKey "{F1}", "Your_Macro_Name"
    .OnKey "{F2}", "Your_Macro_Name"
  End With

End Sub

Sub Workbook_BeforeClose(Cancel As Boolean)

  With Application
    .OnKey "{F1}" 'Clears the setting on close
    .OnKey "{F2}"
  End With

End Sub

  • No labels