I am trying to run a script in AutoCAD LT from and Excel macro.
My macro so far is:
Sub Test()
Dim channelnumber As Long
Dim SCRfilename As String
SCRfilename = TestFile
channelnumber = Application.DDEInitiate(app:="AutoCAD LT.dde", topic:="system")
Application.DDEExecute channelnumber, "filedia 0" & vbCr
Application.DDEExecute channelnumber, "Script "
Application.DDEExecute channelnumber, Chr(34) & SCRfilename & Chr(34) & vbCr
End Sub
AutoCAD is not getting the SCRfilename variable. When I look at the command line, it receives the "", but nothing in between. Can someone tell me what is wrong with my syntax?