Saturday, September 18, 2010

Display a form once Excel executed

This code will let the designed Form to appear in the screen once the Excel file executed.
To set this go to Project Window and double click at ThisWorkbook. Copy below code and change the form name as you want eg. frmReadDir.Show

Private Sub Workbook_Open()
    On Error GoTo error_message
    Exit Sub
    response = MsgBox("Error " & Err.Number & " " & Err.Description, vbExclamation)
End Sub

No comments:

Post a Comment

Please add if your have better information.