R
Raj
Hi,
I am having a problem with the code below. The Msgbox appears twice
when I close the workbook Why?
Also, a Microsoft bug report is being generated everytime.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
rspresponse1 = MsgBox("Do you want to Finalise?", vbYesNo)
If rspresponse1 = vbYes Then Me.Close SaveChanges:=True
If rspresponse1 = vbNo Then Me.Close SaveChanges:=False
End Sub
Please help.
Thanks in advance.
Regards,
Raj
I am having a problem with the code below. The Msgbox appears twice
when I close the workbook Why?
Also, a Microsoft bug report is being generated everytime.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
rspresponse1 = MsgBox("Do you want to Finalise?", vbYesNo)
If rspresponse1 = vbYes Then Me.Close SaveChanges:=True
If rspresponse1 = vbNo Then Me.Close SaveChanges:=False
End Sub
Please help.
Thanks in advance.
Regards,
Raj