Thread: ComboBox and if
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alok Alok is offline
external usenet poster
 
Posts: 318
Default ComboBox and if

Hi
I am slightly modifying the code from an earlier reply to your question. It
is not clear what you mean by 'get' but instead I will just use the Message
box to display.

Private Sub ComboBox1_Click()
Select Case ComboBox1
Case "Yes"
Msgbox Sheet1.Cells(1,1).value
Case "No"
Msgbox "0.000"
End Select
End Sub


" wrote:


How can i write a code for a ComboBox with two values Yes and No, when
I choose Yes I get Cell A1 and when I choose No I get 0.000?