cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Automate values Excel to Mathcad15 using VBA and return backto excel.

Sakthi-kiran
4-Participant

Automate values Excel to Mathcad15 using VBA and return backto excel.

Hi,

 

I am using Mathcad15 and new to it.

 

i need to feed typically 4 basic values into mathcad and get result back. i have more than 160 sheets to work.

 

Am trying to automate the values logged in excel to feed in Mathcad as different files saving as PDF well.

 

Can anyone suggest or confirm this one is workable.

 

I tried few times but end up with error loading page. Provided the code below.

 

1 REPLY 1
LucMeekes
23-Emerald III
(To:Sakthi-kiran)

Your excel file has two cells filled:

A1 contains OD

B1 contains 100

 

Your script takes these two values and assigns them to var1 and var2 respectively.

Then it attempts to bind the two values to the real parts of Mathcad variables A and B respectively.

Since Var1's value is OD, which is a string, this swill fail.

Also your script executes a calculation and saves the sheet, but produces no .pdf output...

 

You say you have 160+ sheets to work...

Do they all have the same calculation, and are you attempting to automate executing that same calculation on the basis of 4 variables that take on different values in each of the 160+ sheets? Then it's easier to put the 160+ different sets of 4 variables in a matrix (in Excel if you insist), and have Mathcad calculate the results in one go (and export the results to an excel sheet if necessary).

 

Please explain your scenario better.

Success!
Luc

Top Tags