Opening an ACAD drawing Error: MDI mode!
I can't seem to open an Autocad drawing in VBA. i keep getting a Collection not available in MDI mode error. Use documents. Here's the code I'm trying to run.
VB Code:
Set acad = CreateObject("Autocad.Application")
Set acad = GetObject(, "AutoCAD.Application")
acad.Visible = False
'Hide the dialogue box
Set acaDoc = acad.ActiveDocument
acaDoc.Open "C:\Projects\W7ls0116.dwg"
Set pViewport = acaDoc.ActiveViewport
pViewport.ZoomExtents
Set sset = acaDoc.SelectionSets.Add("NEWSS")
sset.Select acSelectionSetAll Set acad = CreateObject