Graham has attended:
Excel VBA Intro Intermediate course
User Information
Hi, I have a VBA program that can run an ODBC link to update information. This works fine but the screen appears to be doing nothing while this happens. So I would like to display something like a message box on the screen advising that "Program Running" which will then disappear when the ODBC has completed. I have looked at Message boxes but they appear to requrie user to atleast press one button and the program will stop until they have responded which is not what I really want.
Is the a display only type information box? Thanks Graham
RE: User Information
Hello Graham,
You could try the following:
Create a userform with message such as Please Wait...
e.g. form name is called WaitForm
Then include this line at the beginning of the Sub routine that connects ODBC etc..
WaitForm.Show False
Then at the end of the Routine, just before the End Sub line, place this line:
WaitForm.Hide
I hope this resolves your question. If it has, please mark this question as resolved.
If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Mark
Microsoft Office Specialist Trainer
RE: User Information
Hi Mark
I have tried what you suggest. The closest I have got is by making the modal property false to prevent stopping the VBA code running background.
However I now only get a blank user form i.e. it does not display the text label where I have typed the message to be displayed.
Does it make a difference that I already have a user form which I unload before trying to display the message?
Graham
RE: User Information
Hello Graham,
Without seeing the actual code I could be sending numerous suggestions. If you could send over some sample code that is running, I could have a quick look.
mm@stl-training.co.uk
If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Mark
Microsoft Office Specialist Trainer