FranksBank
Nov 25 2004, 05:53 AM
Can anyone tell me if it's possible to create a Message Box in Access 97 (or 2000) that provides the ability to either proceed with or cancel the Macro. I.e. I have one Macro that runs various others and I would like a 'warning' message that says what's about to happen and asks the user if they are sure they want to continue. This obviously needs to incorporate a way for the user to cancel the Macro if they don't want to carry on.
Is this possible, and if so how?
Any ideas?
Cheers
FB
ScottGem
Nov 27 2004, 05:48 AM
I'm not sure how to do it in macros (I practically never use them), but its easy in a module:
If MsgBox("messagetext",vbOKCancel,"Warning") = vbOK Then
proceed with actions
End If
HTH
FranksBank
Dec 3 2004, 01:21 PM
Scott, my thanks to you.
This works perfectly. I just needed a 'checkpoint' before a whole bucket load of things got updated. I'd tried a MsgBox line in VB but the Cancel bit didn't work. Your solution is way more simple, and works!
Thanks again
Cheers
FB
Edited by: FranksBank on Fri Dec 3 13:37:24 EST 2004.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.