Martin Posted July 28, 2016 Report Share Posted July 28, 2016 Hello, i have threePrompts to enter different names. If the user presses cancel i can handle this error - do i have to put the errorhandlingaround each of the Input lines or is there a better solution - Thank you very much! Martin <VARIABLE SET STRING Option="\x01" Destination="%BFG%" Prompt="Bitte BFG eingeben - Mehrere bitte getrennt mit ; zB.\r\nMartin Krug; Max Muster" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/><ON ERROR/><CATCH ERROR Code="2"/><MACRO RUN Use_ID="FALSE" Name="Hauptfunktion" ID="-1" Wait="TRUE"/><END CATCH ERROR/><END ERROR/><VARIABLE SET STRING Option="\x01" Destination="%EDVB%" Prompt="Bitte EDVB eingeben - Mehrere bitte getrennt mit ; zB.\r\nMartin Krug; Max Muster" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <ON ERROR/><CATCH ERROR Code="2"/><MACRO RUN Use_ID="FALSE" Name="Hauptfunktion" ID="-1" Wait="TRUE"/><END CATCH ERROR/><END ERROR/><VARIABLE SET STRING Option="\x01" Destination="%KME%" Prompt="Bitte EDVB eingeben - Mehrere bitte getrennt mit ; zB.\r\nMartin Krug; Max Muster" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <ON ERROR/><CATCH ERROR Code="2"/><MACRO RUN Use_ID="FALSE" Name="Hauptfunktion" ID="-1" Wait="TRUE"/><END CATCH ERROR/><END ERROR/> Quote Link to comment Share on other sites More sharing options...
Cory Posted July 29, 2016 Report Share Posted July 29, 2016 I don't understand why you are using error handling. Error handling is for system errors, not human. EG a file can't be read. Although for detecting "cancel" it's useful. Besides that validating user input should just be done programmatically. What I do is create a loop. The only way out of the loop is to pass a test. If they pas the test I exit the loop. If it doesn't pass the test it pops up an error message and the loop recycles. Then I usually use the cancel button to abort the macro. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.