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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Combobox

ptc-4260912
1-Visitor

Combobox

Hello,

when a mathcad sheet has a combobox, and I try to open it, i get an error message" an unknown runtime error occured, existing". what do i need to do to be able to open any mathcadsheet with combo boxes? Thanks!

38 REPLIES 38

Hello!

Which version of Mathcad you are using and what OS is running?

I have Mathcad14, and Windows XP. Thanks!

I have Mathcad14, and Windows XP. Thanks!

I have Mathcad14, and Windows XP. Thanks!

SAM FARES wrote:

Hello,

when a mathcad sheet has a combobox, and I try to open it, i get an error message...

Could you also to attach a Mathcad worksheet?

Here's a tip how to attach a file:

1. Step

Pic_1.jpg

2. Step

Pic_2.jpg

Attached is the mathcadsheet you requested. Thanks!

RichardJ
19-Tanzanite
(To:ptc-4260912)

Please post an example worksheet.

Hello Richard,

when i am replying to you, how could i attach the mathcadsheet?

RichardJ
19-Tanzanite
(To:ptc-4260912)

At the top right it says "Use advanced Editor". Click on that, then you will be able to attach files.

The advanced editor used to be the default. I don't know why they changed it.

attached is the mathcadsheet with comboboxes!

Thanks!

RichardJ
19-Tanzanite
(To:ptc-4260912)

Some of the list boxes try to access an Excel file, AISC 13th Edition.xls. Can you post that file?

Attached is the AISC 13TH edition. Thanks Richard!

RichardJ
19-Tanzanite
(To:ptc-4260912)

With the spreadsheet in the correct location (M:\Database) your worksheet opens fine for me. Since you can open the basic listbox worksheet I posted I suspect your problem is with Excel, not the listboxes. Do you have the worksheet in the correct location? What version of Excel are you using? What happens if you open the worksheet directly in Excel?

when you opened the mathcadsheet before you recieved the excel sheet, did the mathcadsheet open all the way ? meaning , were you able to see the information inside the mathcadsheet? i have excel 2007.

how do i open the worksheet directly in excel?

RichardJ
19-Tanzanite
(To:ptc-4260912)


when you opened the mathcadsheet before you recieved the excel sheet, did the mathcadsheet open all the way ? meaning , were you able to see the information inside the mathcadsheet?

Yes.

how do i open the worksheet directly in excel?

Sorry. A brain short circuit. I meant spreadsheet.

As he mathcad sheet is trying to open, the error message pops on the screen before i get to see anything inside the mathcad sheet.

RichardJ
19-Tanzanite
(To:ptc-4260912)

Can you open this one?

No I am not able to open the attachment you sent.

could you change inside the mathcadsheet so that it looks for the AISC 13TH EDITION Excel sheet to be on C drive instead of M: then send it to me just to see if this would help? Thanks!

RichardJ
19-Tanzanite
(To:ptc-4260912)

Changing the path will make no difference. In the worksheet I just posted I disabled all the listboxes that access the Excel spreadsheet.

when you opened the mathcadsheet before you recieved the excel sheet, did the mathcadsheet open all the way ? meaning , were you able to see the information inside the mathcadsheet? i have excel 2007.

how do i open the worksheet directly in excel?

The file "AISC 13th EDITION.xls" located on your computer in folder "M:\Database\AISC 13th EDITION.xls"?

RichardJ
19-Tanzanite
(To:ptc-4260912)

Do you get an error when you open the attached Mathcad file?

yes i am able to open it.

yes i am able to open it.

All seems to work fine if your path to AISC 13th EDITION.xls is set properly. I would recommend making filename a variable in your worksheet such as filename = "AISC 13th EDITION.xls" and pass it to each of your combo-boxs which open the Excel worksheet. Or you coudl simply add into each combo-box script

filename = Worksheet.Getvalue("filename")

If the path to your file i snot correct you'll get a runtime error from the following line

Set objWorkbook = objExcel.Workbooks.Open("D\jsheehan\support\2011\AISC 13th Edition.xls")

Thanks John!!

in the attached mathcadsheet, i have to type in the code, beam, support, which is a bit inconvient. how would you setup a list box or a combo box i am not sure the difference between the two so that al i need to do is scroll down and select the beam size , or support size which are looked up in the table inside Beam and support data area. as far as the code eithe "ASD" or LRFD"?

RichardJ
19-Tanzanite
(To:ptc-4260912)

Does your positive reply mean that if you put the Excel spreadsheet in the correct path it works? If so, that's surprising, since you said you could not open the worksheet I posted above that does not access the spreadsheet.

i am not sure the difference between the two

They are listboxes. Mathcad does not offer comboboxes as controls.

how would you setup a list box or a combo box i am not sure the difference between the two so that al i need to do is scroll down and select the beam size , or support size which are looked up in the table inside Beam and support data area. as far as the code eithe "ASD" or LRFD"?

I'm confused. Isn't that what the listboxes in your other worksheet already do?

The mathcasheet that you were able to open, and i was not has listboxes. i was not able to open for some reason . This is why i posted my question few days ago. Few months ago i had some one remove remove all the listboxes from it so i can open it, and i was able to open it after removing the list boxes. the inconveience that i have now is that i have to type in the beam size, support size,,,,,, all the fields highlighted in yellow in the attached mathcadsheet that i sent you earlier named"Listbox".

what is the procedure on how to insert a listbox that will read for example the beam sizes from the Excel sheet, similarly the other input info highlighted in yellow in the mathcadsheet. Thanks!

Hi Sam,

Your worksheet is using listboxes properly for the worksheet your original worksheet Double Angle-Welded NSL. There is a problem with the script in your listbox Angles.All values are returning zero. Unfortunately I am not on your platform, I am running Window 7 on a 64bit machine. So you may be seeing other issues.

I am looking into the scripting error.

Are you able to get back values from your first 3-4 listboxes or do you get an error right away?

More specifically .. can you run richard's "very basic listbox.xmcdz" example?

John

Announcements

Top Tags