KaibleBasha
New Member
- Joined
- Aug 8, 2014
- Messages
- 36
Hi,
I am just wondering if there is an easy way to run a macro based on the values within a listbox.
E.g. I have four macros for four reports. I add the names of these reports into a listbox and select them as necessary. How do I then reference them in Application.run or Call?
Item names / Macro names are;
Caseload
TOPs
BBV
MedicalReviews
This is how each item is selected (add = button);
Sub Add_Click()
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then ListBox2.AddItem ListBox1.List(i)
Next i
End Sub
I took this from;
Multiple List Box Selections in Excel VBA - Easy Excel Macros
Ideally they would run in sequence, so when one finishes the next in the list runs as I will pre populate the sheets with raw data.
Thanks for any help, & heads up - I am probably going to be slow replying due to work.
Kai
I am just wondering if there is an easy way to run a macro based on the values within a listbox.
E.g. I have four macros for four reports. I add the names of these reports into a listbox and select them as necessary. How do I then reference them in Application.run or Call?
Item names / Macro names are;
Caseload
TOPs
BBV
MedicalReviews
This is how each item is selected (add = button);
Sub Add_Click()
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then ListBox2.AddItem ListBox1.List(i)
Next i
End Sub
I took this from;
Multiple List Box Selections in Excel VBA - Easy Excel Macros
Ideally they would run in sequence, so when one finishes the next in the list runs as I will pre populate the sheets with raw data.
Thanks for any help, & heads up - I am probably going to be slow replying due to work.
Kai