Hi all,

i have the below code:

Private Sub SubmitBtn_Click()
Cells(ActiveCell.Row, "E").Value = Me.DropBox.Text & " - " & Me.TextBox1.Text
Cells(ActiveCell.Row, "F").Value = Me.ComboBox1.Text & " - " & Me.TextBox2.Text
Cells(ActiveCell.Row, "G").Value = Me.ComboBox3.Text & " - " & Me.TextBox3.Text
Cells(ActiveCell.Row, "H").Value = Me.ComboBox5.Text & " - " & Me.TextBox4.Text
Cells(ActiveCell.Row, "I").Value = Me.ComboBox7.Text & " - " & Me.TextBox5.Text
Cells(ActiveCell.Row, "J").Value = Me.ComboBox9.Text & " - " & Me.TextBox6.Text
Cells(ActiveCell.Row, "K").Value = Me.ComboBox11.Text & " - " & Me.TextBox7.Text
Cells(ActiveCell.Row, "L").Value = Me.ComboBox13.Text & " - " & Me.TextBox8.Text
Unload Me
End Sub
When the submit btn is clicked it will past the value of the combobox followed by " - " to separate when it also pastes in the value from a textbox. The problem I am having is that this will populate each cell with " - " even if the combobox and textbox is empty which causes a few problems with reporting. I need this code to ONLY post to the cell if the combobox and textbox both contain text, if either of them are empty it will not post anything at all. I have tried a few solutions such as writing the code to clear cells if they equal " - " but it isnt very efficient. Can anyone advise of a quick efficient way to get this to work?