Problem Displaying MsgBox Elements

swbrodie

Registered User.
Local time
Today, 06:10
Joined
Apr 9, 2003
Messages
18
Hello.

I have created a macro that exports data to a text file. The first line displays a message warning the user that performing the action will overwrite the existing file.

The action is set to StopMacro and the condition is set to:

Not MsgBox("Backup Confirmation@Are you sure you wish to perform a backup?@Existing backup files will be overwritten.",1)=1

This displays a message box with OK and Cancel buttons. If the user clicks OK, the macro continues. If the user clicks Cancel, the macro stops.

Everything works properly, but I would like the message box to be more like the one created using the MsgBox action itself. I would like to have it display the image for the type of message Critical, Information, Warning).

Is there any way to do this?

Thanks.
 
The help files are full of wonderful information...:D

For message boxes, the Exclamation , Critical, etc. codes are thus:

Critical (16), Question (32), Exclamation (48), Information (64)

So if you wanted a vbOkCancel message box with an exclamation mark using the code you have mentioned:


Not MsgBox("Backup Confirmation@Are you sure you wish to perform a backup?@Existing backup files will be overwritten.",1 + 48)=1
 
Oh, thank you, thank you, thank you. You are the greatest! This is a very happy me about now. --> :D I hadn't been able to find that information anywhere.

I don't suppose you know how to display a list of open windows in a custom menu bar, without using the built-in window menu. If you use the built-in one, it changes depending on the individual user's settings.

Just thought I'd ask, since I've posted that one before and never got an answer. And you are all-knowing.

Thanks again.
 
By open windows do you just mean any and all of them?

To get a window'd ID you can use an API call to get its ID but I believe that number, which will change every time, will be hard - to implement a naming system towards and put in a custom menu for the sake of user friendliness.

It probably can be done but if you are still using macros to perform actions then I fear you might find the code rather daunting.
 
Well, I'd like to see a list of open Forms or Reports that behaves just like the list in the built-in window menu does. That way, if a user opens multiple Forms in the application, for example, they can click on the custom menu to view and get to them easily.

Otherwise, they have to reopen them to bring them back into focus, or they have to close the ones on top to see the ones underneath.

I had hoped that there was a particular command in the customize menu that could be dragged into a custom menu that would create this list, but I have never found one.

Oh well. Thanks again for all your help.
 

Users who are viewing this thread

Back
Top Bottom