×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Displaying Msgbox in another application

Displaying Msgbox in another application

Displaying Msgbox in another application

(OP)
I'm writing a VBA program in AutoCAD. I open Excel and dump some data in the spreadsheet and then I want to display a msgbox that says "Data Extraction Completed". Since the spreadsheet is on top, I need to invoke the msgbox from the Excel application for it to be on top. Can I display a msgbox in Excel from AutoCAD?

RE: Displaying Msgbox in another application

I don't think you can do it directly but you could have a macro inside of Excel that would display the message box when a certain cell is populated. Then, have the last step of your data dump be to write a flag to that cell.

--------------------
How much do YOU owe?
http://www.brillig.com/debt_clock/
--------------------

RE: Displaying Msgbox in another application

I don't know of a way, other than having the Excel sheet contain a macro and calling the macro using the .run method of the Excel Application object.


Would it suffice to re-activate AutoCad, display the message box, and then re-activate Excel?

Alternately, you could set the Excel application visibility to False while processing, and then set it to True and AppActivate it when processing is complete.  Then the message box is not needed.

RE: Displaying Msgbox in another application

(OP)
That was too easy. It worked fine and it gave me the exact results I wanted. THANKS

RE: Displaying Msgbox in another application

What was easy, which method did you use?

RE: Displaying Msgbox in another application

(OP)
I opened the Excel spreadsheet and wrote the data to the spreadsheet. Then I used the command Excel.Visible = False to hide the spreadsheet so the AutoCAD application was visible to display the msgbox. After the msgbox statement I then had the Excel.Visible = True command to make the Excel application visible again. Just make sure that the last thing you do is make the spreadsheet visible or else when you go to open it again, you won't see anything.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources