I\'m very new to programming and I\'m just starting to learn VBA with excel. I came across on this website and did the examples here but I have question about this code:
<
Just rewrite to the equivalent:
Private Sub CommandButton1_Click()
Dim optionSelected As VbMsgBoxResult
optionSelected = MsgBox("Click Yes to Proceed, No to stop", vbYesNoCancel, "Login")
If optionSelected = vbYes Then
Range("A1").Value = "You may proceed"
ActiveWorkbook.Activate
ElseIf optionSelected = vbNo Then
ActiveWorkbook.Close
End If
End Sub
And move on