
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to write a vba code in excel that picks up un text from a cell in an excel worksheet and finds it on an autocad drawing.
here is my code:
Sub FindTextOnAcad()
Dim Acad As acadapplication
Dim acadfile As String
acadfile = myfile.dwg
ActiveWorkbook.FollowHyperlink acadfile
Set Acad = GetObject(, "autocad.application")
Acad.ActiveDocument.sendcommand("find" & vbCr)
End Sub
This works well and opens the "Find" dialogue box in the acad drawing so I can imput the text from excel manually.
But what I need is to have vba directly find the required text without opening the "find" dialogue box
I tried the following: Acad.ActiveDocument.modelspace.find but it doesnt work
Thanks in advance for any suggestion
Almaroun
Solved! Go to Solution.