"PLEASE WAIT" Window Message

M

Maperalia

I have a macro that draw from excel to AutoCAD. I create a window message
"PLEASE WAIT"; However, when the macro opens AutoCAD the window message is
been held behind the AutoCAD window. I changed the AutoCAD visible from true
to false. So I can see the window messsage in the front. Unfortunatelly, I
have to have AutoCAD visiblity because I need to visually review the final
AutoCAD file.
If there is any way to make this window message from excel macro to make it
appear when the Autocad software, appear?

Thanks in advance.
Maperalia
 
P

Peter T

Not sure I quite follow but sounds like you need to activate Excel before
displaying the msgbox. You could try

' in Excel
AppActivate Application.Caption
Msgbox "my message"

If that doesn't work might need to resort to using APIs to bring Excel to
the front and activate before displaying the msgbox.

Regards,
Peter T
 
M

Maperalia

Peter;

Thanks for your quick response.
In fact, what I need is the window message to be visible all the time until
the macro is done.
The window appears very well when the macro is still working in excel.
However, when it jumps to AutoCAD the window message stays behind the AutoCAD
windows. I want this window message appear in front of the AutoCAD window
instead.

Kind regards.
Maperalia
 
P

Peter T

I don't think that is possible, at least not with a msgbox. I did once look
into the possibility of 'separating' a userform from its owner/parent Excel
but didn't find a way of doing that permanently, either forcing it to the
front without Excel or changing its owner/parent to that of some other
window.

I suspect the only way would be to write your own (eg VB6) dll with a form
that simulates a msgbox. You could then do pretty much what you want with
the form's window, eg make it a child window of your AutoCad, or have a
timer regularly ensure it is at the front.

Regards,
Peter T
 
M

Maperalia

Peter;
Thanks very much for the information. I have not had an idea that I was
getting in something more complicate. My knowledge in VBA is pretty basic.
Therefore, I will not be able to develop a program in VB6.
I will appreciate your letting me know if there is any way to get this VB6
statement to make it work. Unfortunately, the macro takes around 50 seconds
to run and the people who is using in my group sometimes think that there is
a problem or the computer got freeze and they do different steps in the
middle that force the system to collapse.


Kind regards.
Maperalia.
 
P

Peter T

I don't know AutoCad but if it hosts VBA can it not also display a form to
let your users know what's going on. Maybe your Excel macro could automate
AutoCad and get some VBA from within to show that form, ie on top of
Autocad. It'd need to be modeless to allow other code to process, then
something to close it when done.

I'm shooting from the hip and probably into the sky, just a wild thought !

Regards,
Peter T
 
M

Maperalia

Peter;
Thanks for your advise. However, since I am VBA beginner I have no idea what
you are taking about.
That OK!! probably I am trying to do something that is really out of my
knowledge.

Kind regards.
Maperalia.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top