Display a message when opening Excel file

  • Thread starter Thread starter Guest
  • Start date Start date
Private Sub Workbook_Open()
MsgBox "hello"
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
 
Back
Top