Khan.saleena
New Member
- Joined
- Dec 17, 2012
- Messages
- 4
Hello 
So basically, I have created a Userform and it asks the question "Do you wish to continue to Log Out?" and there are two Command Buttons within that Userform. A "No" Command Button and a "Yes" Command Button.
If the individual was to press "Yes" then the Workbook would automatically shut down, however if the individual was to press "No" then it would re-locate them to another sheet within that same Workbook.
However I am having some trouble with the VBA coding for the "No" command button.
This is the current coding that is inputted, however it keeps getting highlighted in yellow -
Private Sub CommandButton1_Click()<o
></o
>
Application.Goto Worksheets("Sheet4"), Range("A1")<o
></o
>
Unload Me ' unloads the userform<o
></o
>
End Sub
Thank You

So basically, I have created a Userform and it asks the question "Do you wish to continue to Log Out?" and there are two Command Buttons within that Userform. A "No" Command Button and a "Yes" Command Button.
If the individual was to press "Yes" then the Workbook would automatically shut down, however if the individual was to press "No" then it would re-locate them to another sheet within that same Workbook.
However I am having some trouble with the VBA coding for the "No" command button.
This is the current coding that is inputted, however it keeps getting highlighted in yellow -
Private Sub CommandButton1_Click()<o


Application.Goto Worksheets("Sheet4"), Range("A1")<o


Unload Me ' unloads the userform<o


End Sub
Thank You
