Don't let the title confuse you, this is more complex than you think..... I have a combobox with code:
(FYI this code works perfectly No Changes please)
However, Imagine that there are several extra items in this list. Range A17 will change regularly to a different set of terms/items along with all the other add items (each will be calling from a different cell (and possibly sheet), and will have different information) I need a code that will allow me to run a macro based on the selection with this in mind, and as the name changes all the time using format:
Won't work, as cell A17 will rarely if ever equal the same thing more than 1 time and changes every 10-15mins. I am thinking the code might be similar to:
However that does not work.... Please Help...
EDIT: (I think I got it, any suggestions)
(FYI this code works perfectly No Changes please)
Code:
Sub UserForm_Initialize()
With ComboBox2
.AddItem Worksheets("Sheet3").Range("A17").Value
End With
End Sub
However, Imagine that there are several extra items in this list. Range A17 will change regularly to a different set of terms/items along with all the other add items (each will be calling from a different cell (and possibly sheet), and will have different information) I need a code that will allow me to run a macro based on the selection with this in mind, and as the name changes all the time using format:
Code:
If Me.Combobox2.Value = "(Static Text)" Then
Call "macro name"
Range("B2").Select
End If
Won't work, as cell A17 will rarely if ever equal the same thing more than 1 time and changes every 10-15mins. I am thinking the code might be similar to:
Code:
If Me.Combobox2.Value = "Worksheets("Sheet3").Range("A17").Value" Then
Call "macro name"
Range("B2").Select
End If
However that does not work.... Please Help...
EDIT: (I think I got it, any suggestions)
Code:
If Me.Combobox2.Value = Worksheets("Sheet3").Range("A17").Value Then
Call "macro name"
Range("B2").Select
End If
Last edited: