help with if statement

  • Thread starter Thread starter Shane
  • Start date Start date
S

Shane

I need help on my if statement.

I am populating selected cells in a spreadsheet by use of a userform.
The polulating works great. I would like to adjust my code so that if
no value is selected from from the combobox then the target cell will
retain its original value/formula. Any help would be great

Here is what I have so far.

If ComboBox_Sub.Value Is Nothing Then
?????
Else
Cells(r, 11) = ComboBox_Sub.Value
End If

Shane
 
One way:

If Combobox_Sub.Value <> vbNullString Then _
Cells(r, 11) = Combobox_Sub.Value
 
Back
Top