03-12-2023 04:35 AM
Hello,
I need some help finding the best way to allow a user to update data using a dialogue box whist a script is running. I have an existing script which goes like this:
What I would like is the following:
I think a relatively easy way to implement this process is to show a standard modal dialogue box instead of the message box, on which are some checkboxes representing alternative approximation coefficients. Once the user OKs the box, the script evaluates the checkboxes, updates the approximation and reshows the VIEW sheet and dialogue box. A slight challenge here is how the user tells the script he's is happy with the approximation and to move on to the next sheet.
However, I think there maybe neater and less clunky alternatives, either with a non-modal dialogue box or with a dialogue box within an area on each sheet. I've investigated the latter and have it partially working with checkboxes and a button to update the approximation. The problem I have is with the For..Next loop as I can't get it to stop/pause whilst the user makes any updates to the approximation on the current sheet. Could I use the interaction button to stop the script? This would need to allow the code associated with the VIEW area dialogue box to run. If not, what alternatives do I have to pause the script whilst the user uses a dialogue box of some sort to update the approximation before then returning to the For..Next loop?
Regards,
Simon.
Solved! Go to Solution.
03-13-2023 04:35 AM
Hello Simon,
I have created a small example and attached it. Are you looking for something like this?
Greetings
Walter
03-13-2023 04:50 AM
Hi Walter,
Thanks for creating that for me. Yes, it does do what I want.
I managed to get a View area dialogue working well by using the InteractionOn to pause the For..Next loop. I had not appreciated that you could still run dialogue control event code even after InteractionOn was set.
I will set your reply as the solution.
Regards,
Simon.