Hi
I have created the progress bar in one of my tool using Forms, if the User clicks the Cancel button in the progress bar, it should prompt the User to confirm the cancellation with Yes and No button, when No button got pressed, the macro should stop at the point. Below is my code which I tried, this code got hung in showing the prompt, not working as I expects, Help me here..
Private Sub btnCancel_Click()
If Not (VbMsgBoxResult.vbYes = MsgBox("Are you sure you want to cancel the process?", vbYesNo + vbDefaultButton2 + vbQuestion, "Cancel Process?")) Then
Exit Sub
End If
m_canceled = True
btnCancel.Enabled = False
btnCancel.Caption = "Cancelling..."
End Sub
If Not (VbMsgBoxResult.vbYes = MsgBox("Are you sure you want to cancel the process?", vbYesNo + vbDefaultButton2 + vbQuestion, "Cancel Process?")) Then
Exit Sub
End If
m_canceled = True
btnCancel.Enabled = False
btnCancel.Caption = "Cancelling..."
End Sub
Thanks
Satheesh Kumar S
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar