TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

Open a file
Read 1846 times
* August 30, 2011, 06:25:41 AM
So I'm just trying to open a file with a specified path, but the most recent file is opened instead. Here is my code:

Option Explicit
Dim tcApp
Dim tcDwg

Set tcApp = CreateObject("TurboCAD.Application")
dim myStr
myStr = "C:/Drawing2.tcw"
tcApp.Drawings.Open(myStr)



I have looked at the open method in an Object browser and it claims the only required argument is a string filename. as far as I can see that is what I am sending

Logged


* August 30, 2011, 11:00:03 AM
#1
Hi Samski

try this one:

Option Explicit
Dim tcApp
Dim tcDwg

Set tcApp = CreateObject("TurboCAD.Application")
dim myStr
myStr = "C:/test.tcw"tr)

Set tcDwg = tcapp.Drawings.Open(mystr)

mike

Logged