Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing string variable from Excel to Mathcad

Status
Not open for further replies.

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]
 
Replies continue below

Recommended for you

See the other thread in this forum.

You pass variables in/out of Mathcad through named ranges

TTFN



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor