I have a userform that uses 3 dropdowns and a freeform textbox to place into a cell.
Private Sub buttonOK_Click()
If Me.combobox.ListIndex < 0 Then
MsgBox "Please select an UA"
Else
CellInput = Me.NTULIST & " " & Me.ModellingStatus & " " & Me.textboxAdditionalText & " " & " " & Me.combobox
Me.Hide
End If
End Sub
Currenty the code above lists the 4 entries in one cell. What I would love it to do is have an if statement in there, to say that If ntulist.listindex = blank then
CellInput = Me.ModellingStatus & " " & Me.textboxAdditionalText & " " & " " & Me.combobox
If modellingstatus.listindex = blank then
CellInput = Me.NTULIST & " " & Me.textboxAdditionalText & " " & " " & Me.combobox
if they are both blank then
Me.textboxAdditionalText & " " & " " & Me.combobox
can anyone help?
Bookmarks