×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Passing string variable from Excel to Mathcad

Passing string variable from Excel to Mathcad

Passing string variable from Excel to Mathcad

(OP)
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",?????)

RE: Passing string variable from Excel to Mathcad

See the other thread in this forum.  

You pass variables in/out of Mathcad through named ranges

TTFN



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources