I have created an Inputbox to get the username entered but stuck with the cancel button
Private Sub Form_Load()
fsUserName = UCase(InputBox("Please Enter your name.", "User Name", _
"dc"))
If fsUserName = "" Then
MsgBox "No name Entered." & Chr(13) & Chr(13) & _
"You must enter a name.", vbExclamation, "ERROR"
Form_Load
ElseIf VarType(fsUserName) = 0 Then 'If cancel clicked
cmdQuit_Click
End If
Also is there a way that when the X button on the form is clicked it executes cmdQuit_Click so that if the userclicks the command button Quit or X ,the Quit script is run.In the quit script there are message boxes and cleanup.