Forum Discussion
bottaxxgp
Jan 10, 2024Copper Contributor
Excel for Web: Control equivalent to the VBA messagebox
Hello, there is a control in Excel for web to obtain a pop up message during a script execution? Thank you
JKPieterse
Jan 10, 2024Silver Contributor
No there isn't, but you could insert a worksheet and place the message on there?
bottaxxgp
Jan 10, 2024Copper Contributor
Yes, but insert a new worksheet for some message is a bit too invasive.
Actually I use a range in the worksheet, colored, deputy to print any message.
This works but in this way the message remains displayed until a new execution of any script that clears the "message area"
Actually I use a range in the worksheet, colored, deputy to print any message.
This works but in this way the message remains displayed until a new execution of any script that clears the "message area"
- JKPieterseJan 10, 2024Silver ContributorYes it is not ideal that Office Script doesn't have a way to show a message box of some sort.
Perhaps you should file an idea here: https://feedbackportal.microsoft.com/feedback/search/c23f3b77-f01b-ec11-b6e7-0022481f8472?q=script- mtarlerJan 10, 2024Silver ContributorI wonder ... could you had the script insert and show that new sheet with the message and also add an 'OK' button that is linked to another script that will then hide that sheet? I've never tried to have a script add a button to another script and don't recall a way to do that off hand, but that could be slick. If not, can you pre-create a sheet in the workbook with the colored range and pseudo message box styling and the OK button to hide that sheet so then the script only needs to unhide that sheet and insert the corresponding message in the correct range.
- bottaxxgpJan 10, 2024Copper Contributormtarler good solution.
I cannot create button programmatically linked to a script but i can create some sheet only for show the message and pre-create the button with the Ok button to close the "message sheet"
The only problem is that if the user forget to press Ok, i leave a "message sheet" visible.....
In any case, it's a next step towards a type of pop up that I wasn't able to imagine before.
I could also hide all the other sheets present and leave only the current message sheet, forcing the user to do the only thing possible in that sheet. Press the OK button