• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 646
  • Last Modified:

How can i display a message in the text window using VBA?

I would like to display message in the text window in a VBA application
  • 2
1 Solution
You could do something like the attached code.  Also, instead of using SendCommand to call lisp to bring up the Text window, you coulfd use something like SendKeys to push the F2 to the AutoCAD window and bring up the Text Window a little more cleanly.

Alternativel, Lisp has a lot better control over this sort of output. You might have better luck writing Lisp and to wrote what you want and calling that from VBA, or have VBA use another method to display the information to the user better suited to VBA coding like MsgBox.
Sub textscr()
    ' Send To Command Line
    ThisDrawing.Utility.Prompt "This goes to the command line" & vbCrLf
    ' Activate Text Screen
    ThisDrawing.SendCommand "(textscr)(princ)" & vbCr
End Sub

Open in new window

also available is

ThisDrawing.Utility.Prompt "YourMessageHere"

Oops sorry Darrinmcwi, your code has it already (It looks like a comment on my browser).
BenCalvertAuthor Commented:
This gives me the info I was looking for, thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now