autointern
Automotive
- Jul 26, 2005
- 1
I've been using Mathcad now for all of two days, so I apologize if this is an incredibly easy question. I've also tried to save everyone time by looking through the old posts, but I have not found an answer to my problem anywhere.
I am trying to pass several variables from an Excel worksheet into a Mathcad worksheet with a Visual Basic Macro that references an embedded Mathcad OLE object. I've been able to pass all of the numeric variables into the Mathcad sheet (though not very elegantly). But I need to pass a couple of string variables (file pathnames) into Mathcad and I've not been able to figure out how. I've included excerpts from my VB code below. Any help would be greatly appreciated! Thanks!
' Defines file information variables
Dim file_path, output_path As String
' Read in values to be passed from Excel to Mathcad
file_path = ActiveSheet.Range("D8").Text
output_path = ActiveSheet.Range("D10").Text
' Send the values over to Mathcad
Call MathcadObject.???????("file_path",?????)
Call MathcadObject.???????("output_path",?????)
[/color green]
I am trying to pass several variables from an Excel worksheet into a Mathcad worksheet with a Visual Basic Macro that references an embedded Mathcad OLE object. I've been able to pass all of the numeric variables into the Mathcad sheet (though not very elegantly). But I need to pass a couple of string variables (file pathnames) into Mathcad and I've not been able to figure out how. I've included excerpts from my VB code below. Any help would be greatly appreciated! Thanks!
' Defines file information variables
Dim file_path, output_path As String
' Read in values to be passed from Excel to Mathcad
file_path = ActiveSheet.Range("D8").Text
output_path = ActiveSheet.Range("D10").Text
' Send the values over to Mathcad
Call MathcadObject.???????("file_path",?????)
Call MathcadObject.???????("output_path",?????)
[/color green]