Skip to main content
1-Visitor
April 16, 2014
Solved

Mathcad excel worksheet

  • April 16, 2014
  • 1 reply
  • 2182 views

I am importing data in Mathcad by reading excel file. I want to import worksheet names in listbox for selection. I am new to VB script but with help from various posts on this forum, I have now a script for doing this. But the program is not functioning properly. When I click on sheet 1 in listbox, it gives output as sheet 2 (if I remove +1 in the script for output, it gives error on GetText). Also I am not able to click on last worksheet name as well in list box. Can you please let me know what is the error? I have attached file for reference.

Best answer by Werner_E

The attached sheet should help. See also for a way to avoid rereading the excel file every time you move the cursor.

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
April 16, 2014

The attached sheet should help. See also for a way to avoid rereading the excel file every time you move the cursor.

1-Visitor
April 16, 2014

error.jpg

When I tried to opent the attached file, it gives VB Script error. See the attached screen grab

25-Diamond I
April 16, 2014

Obviously there is no excel file with the name test.xlsx in the current working directory.