rodney_malod
11-23-2005, 05:04 AM
Hi, ive created a userform with two pages, each has 3 criteria for a tank selection. one page is size and the other, type.
i have prices for each combo of tank. and wish to use optionboxes on the userform to get a cell to display a price.
i have this code:
Private Sub CommandButton1_Click()
If optionbox6 = True And optionbox7 = True Then
Range("b30").Select
ActiveCell = "630.8"
Else: End If
If optionbox6 = True Then
If optionbox8 = True Then
Range("b30") = "785.40"
Else: End If
Else: End If
If optionbox6 = True And optionbox9 = True Then
Range("b30") = "873.94"
Else: End If
If optionbox5 = True Then
If optionbox7 = True Then
Range("b30") = "791.83"
Else: End If
Else: End If
If optionbox5 = True Then
If optionbox8 = True Then
Range("b30") = "940.88"
Else: End If
Else: End If
If optionbox5 = True Then
If optionbox9 = True Then
Range("b30") = "1037.67"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox7 = True Then
Range("b30") = "813.81"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox8 = True Then
Range("b30") = "967.94"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox9 = True Then
Range("b30") = "1063.17"
Else: End If
Else: End If
UserForm1.Hide
End Sub
as you can see i have been playing with it to get it to work but have had no luck, help me !! :dunno
i have prices for each combo of tank. and wish to use optionboxes on the userform to get a cell to display a price.
i have this code:
Private Sub CommandButton1_Click()
If optionbox6 = True And optionbox7 = True Then
Range("b30").Select
ActiveCell = "630.8"
Else: End If
If optionbox6 = True Then
If optionbox8 = True Then
Range("b30") = "785.40"
Else: End If
Else: End If
If optionbox6 = True And optionbox9 = True Then
Range("b30") = "873.94"
Else: End If
If optionbox5 = True Then
If optionbox7 = True Then
Range("b30") = "791.83"
Else: End If
Else: End If
If optionbox5 = True Then
If optionbox8 = True Then
Range("b30") = "940.88"
Else: End If
Else: End If
If optionbox5 = True Then
If optionbox9 = True Then
Range("b30") = "1037.67"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox7 = True Then
Range("b30") = "813.81"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox8 = True Then
Range("b30") = "967.94"
Else: End If
Else: End If
If optionbox4 = True Then
If optionbox9 = True Then
Range("b30") = "1063.17"
Else: End If
Else: End If
UserForm1.Hide
End Sub
as you can see i have been playing with it to get it to work but have had no luck, help me !! :dunno