View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default how do i display a value in a user form as a result of a selectio.

Private Sub cboTariff2_click()
If cboTariff2 = 50006 Then
Label74 = "£10.58"

ElseIf cboTariff2.Text = "50002" Then
Label74 = "£11.51"

ElseIf cboTariff2.Text = "50005" Then
Label74 = "£11.85"

End If
End Sub

--
Regards,
Tom Ogilvy


"ptoddx1" wrote in message
...
I am trying to get a value to return in a label within a user form once an
option in a combobox is selected.

This is how I have tried it:

With cboTariff2

.AddItem "50006"
.AddItem "50002"
.AddItem "50005"

End With

If cboTariff2 = 50006 Then
Label74 = "£10.58"

ElseIf cboTariff2.Text = "50002" Then
Label74 = "£11.51"

ElseIf cboTariff2.Text = "50005" Then
Label74 = "£11.85"

End If