Hi all,

I have a ComboBox which upon UserForm initialize should search a a TextBox and always find the string before " - ". The Textbox will either be empty or always have a string of text in it separated by " - ". For example if the TextBox has "Action Alert - Imminent Due Date". Upon UserForm opening the ComboBox will populate with Action Alert as it has found all string before " - ".

This is so that the ComboBox will find any string, no matter how short or long before " - ".

Here is my code so far:

    If Me.TextBox1.Value <> "" Then
        Me.DropBox.Value = "CODE HERE"
    End If