Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I wanted to put an error or info message in my VBA code, so that if the
person running the macro wanted to Cancel instead of Okay an input box and no changes would be made to the excel document, how would I do that? I'd appreciate any ideas! Elise |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Elise148" wrote: If I wanted to put an error or info message in my VBA code, so that if the person running the macro wanted to Cancel instead of Okay an input box and no changes would be made to the excel document, how would I do that? I'd appreciate any ideas! Elise Hi Elise, im as well learning VBA and little by little Im building up on my experience, but in the past I had a similar question as you, How about putting in your macro a code for a re-set of your inputs when a command button is clicked withing your sheet? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's a good idea. The only problem is that I'm sorting data, inserting new
worksheets, and inserting hyperlinks through input boxes. The first imput box comes up a little ways into the macro. What I am thinking is that if someone accidentally pushed the macro button, there's no way to stop the macro and undo the couple steps the macro did before the input box, besides pushing the "Cancel" button, but that doesn't undo what the macro did to that point in it... Any ideas? "N.F" wrote: "Elise148" wrote: If I wanted to put an error or info message in my VBA code, so that if the person running the macro wanted to Cancel instead of Okay an input box and no changes would be made to the excel document, how would I do that? I'd appreciate any ideas! Elise Hi Elise, im as well learning VBA and little by little Im building up on my experience, but in the past I had a similar question as you, How about putting in your macro a code for a re-set of your inputs when a command button is clicked withing your sheet? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi,
just after the input box statement put this... If MsgBox("do you really want to do this?", vbOKCancel, Confirm) = vbCancel Then MsgBox ("Process terminated.") Exit Sub End If regards FSt1 "Elise148" wrote: If I wanted to put an error or info message in my VBA code, so that if the person running the macro wanted to Cancel instead of Okay an input box and no changes would be made to the excel document, how would I do that? I'd appreciate any ideas! Elise |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, I'll give that a try!
"FSt1" wrote: hi, just after the input box statement put this... If MsgBox("do you really want to do this?", vbOKCancel, Confirm) = vbCancel Then MsgBox ("Process terminated.") Exit Sub End If regards FSt1 "Elise148" wrote: If I wanted to put an error or info message in my VBA code, so that if the person running the macro wanted to Cancel instead of Okay an input box and no changes would be made to the excel document, how would I do that? I'd appreciate any ideas! Elise |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
#DIV/0! error message | Excel Worksheet Functions | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
#num! error message | Excel Worksheet Functions |