tazengr
Mechanical
- Mar 1, 2007
- 34
the tutorial i am going through is makes a user form with one combo box and two command buttons.
The combo box is a drop down menu that allows you to pick the material and the code matches that material with the appropriate density.
The two command buttons are "OK" and "cancel".
The code works fine but I am having trouble with the procedure for the OK command where it is supposed to convert the density from lbs/in^3 to kg/m^3
here is the procedure for the "OK" command button.
Private Sub cmdOK_Click()
Dim density As Double
'The required density is in kg/m^3
'so multiply by a scale factor
density = frmMaterials.cboMaterials.Column(1, frmMaterials.cboMaterials.ListIndex) * 27680
Part.SetUserPreferenceDoubleValue(swMaterialPropertyDensity, density)
End
End Sub
I get an error in the row that starts off with density.
Can someone help
thanks,
The combo box is a drop down menu that allows you to pick the material and the code matches that material with the appropriate density.
The two command buttons are "OK" and "cancel".
The code works fine but I am having trouble with the procedure for the OK command where it is supposed to convert the density from lbs/in^3 to kg/m^3
here is the procedure for the "OK" command button.
Private Sub cmdOK_Click()
Dim density As Double
'The required density is in kg/m^3
'so multiply by a scale factor
density = frmMaterials.cboMaterials.Column(1, frmMaterials.cboMaterials.ListIndex) * 27680
Part.SetUserPreferenceDoubleValue(swMaterialPropertyDensity, density)
End
End Sub
I get an error in the row that starts off with density.
Can someone help
thanks,