I have four macros that each one does a search of theoutlook folders for emails or calendar events related to the contact I open orhighlight. The name of each macro is asfollows and each one is in different Module:
Module2 Sub Search_By_Address_From_and_To()
Module3 Sub Search_By_Address_From()
Module4 Sub Search_By_Address_To( )
Module6 SubSearch_Calender()
I have a Userform12 which has a CommandButton15 and a Combobox18, (as the code below this), and it shows effectively droplistwords which when we use them, they will run a macro from that list of 4macros I stated above.
And I have created a new Module18 where I need to put in themacro code that is related to the Userform12, as the droplist to four the othermacros.
I have other Userforms that correlate to macros that run anemail to the contact based on a email template, so the related marcro opens upthe Userform commandbutton andcombobox and I have the droplist of the relatedmacros
So what I need toget, if possible, is the macro for Module18 that will correlate to theUserform12, so it shows up as droplist and I can click on the related macro torun it.
Here is the code I put in the Userform 12:
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox18_Change()
End Sub
Private Sub UserForm_Initialize()
With ComboBox18
.AddItem"Search_By_Address_From_and_To"
.AddItem"Search_By_Address_From"
.AddItem"Search_By_Address_To"
.AddItem"Search_Calender"
End With
End Sub
Private Sub CommandButton15_Click()
lstNum =ComboBox18.ListIndex
Unload Me
End Sub
Module2 Sub Search_By_Address_From_and_To()
Module3 Sub Search_By_Address_From()
Module4 Sub Search_By_Address_To( )
Module6 SubSearch_Calender()
I have a Userform12 which has a CommandButton15 and a Combobox18, (as the code below this), and it shows effectively droplistwords which when we use them, they will run a macro from that list of 4macros I stated above.
And I have created a new Module18 where I need to put in themacro code that is related to the Userform12, as the droplist to four the othermacros.
I have other Userforms that correlate to macros that run anemail to the contact based on a email template, so the related marcro opens upthe Userform commandbutton andcombobox and I have the droplist of the relatedmacros
So what I need toget, if possible, is the macro for Module18 that will correlate to theUserform12, so it shows up as droplist and I can click on the related macro torun it.
Here is the code I put in the Userform 12:
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox18_Change()
End Sub
Private Sub UserForm_Initialize()
With ComboBox18
.AddItem"Search_By_Address_From_and_To"
.AddItem"Search_By_Address_From"
.AddItem"Search_By_Address_To"
.AddItem"Search_Calender"
End With
End Sub
Private Sub CommandButton15_Click()
lstNum =ComboBox18.ListIndex
Unload Me
End Sub