I have created a UserForms with a comboBox (dropdown). And i have also written sub in a module.
I want to call the userforms in the one the steps of the sub, like a Inputbox.
The userforms
I have written the a Public Sub UserForm_Initialize()
in userforms code
Public Sub UserForm_Initialize()
Dim t
UserForm.Show
t = ComboBox1.Value
End Sub
My code in the module :
Sub Ingestion()
Dim x, z
Dim rRange
Sheets("Time Log").Select
x = Range("H300").End(xlUp).Row
If Range("A" & x).Value <> "" Then
z = InputBox("Please confirm the Task type")
Range("B" & x) = z
End If
End Sub
Now I want to change the Input box to the combobox.
but if i call this in the module, it throws an Error :
Sub Test()
Call UserForm_Initialize
End Sub
Sub or Function Not Defined
Basically, i am trying to create a Inputbox with drop down options.