Is there a way to have a message box stay up while fixing bad cells?

I’ve added a basic macro to do a data verification check before the spreadsheet is saved. I can have a message box come up with items that need to be fixed, and I would like to be able to fix the cells with bad data without having to close the message box. The message box I have now won’t allow me to change the sheet until the box is closed. But, when I close the message box, I don’t see the fixes that need to be made. I’ve looked in various guides, but with no success.

I’ve tried using Dialogs, but with no success. This way allows me to change a cell while the dialog box is open, but I can’t close it when I’m done.

	WaitMsg = CreateUnoDialog(DialogLibraries.Standard.WaitingForImage)
	wait 50000

This way allows me to close the dialog box when I wist, but I can’t change any cells on the spreadsheet.

	VerificationBox = CreateUnoDialog(DialogLibraries.Standard.VerificationBox)
	TypeBox = VerificationBox.getControl("ErrMsg")
	TypeBox.Text = VerificationErrMsg
	ArgOut = VerificationBox.Execute()

Thank you. I found this in your answer which gave me just what I needed.


Commenting here only notifies the poster of the question. This comment should be attached under the answer so the person answering gets notified. Only looked here as the question was marked.

Glad you have something which works for you.


What you are looking for is a non-modal dialog. Most dialogs are modal - parent is form which created them. Non-modal is where the desktop is the parent. This allows you move between the dialog & something else such as a spreadsheet, form, document, etc.

Here are links to a couple of my answers containing links to other location which have non-modal dialogs (there are two types, IDE and run time).

Be sure to read all as it gives info about links.

Calc BASIC: How to popup a dialog ?

how can i set DesktopAsParent for a dialog in a library?

Thank you. I found this in your answer which gave me just what I needed.

Thank You. Got notification this time.