besmart,
Try something lik this in your code.
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Are sure you want to do End of Day ?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbNo Then
Exit Sub
End If
If user chose "Yes" then in your code try,
ActiveWorkbook.Save
ActiveWorkbook.Close
HTH
Charle
--
Message posted from
http://www.ExcelForum.com