help with if statement

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
 
J

JE McGimpsey

One way:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top