Choose which Macro to run

kadoyla

New Member
Joined
May 11, 2012
Messages
2
Hi,

I am new to VBA, and have written some simple code that pulls some information out of a SharePoint 2010 list view, and makes some simple calculations within an Excel 2010 table. I have then written a number of individual subs that use the table to prepare a single Pivot Table each. The Pivot Tables are used for adhoc reporting and so I never need more than one Pivot table as I copy it out into an email.

Each of these individual elements works fine, but I would like the first macro, PopulateData(), to prepare the table and then pop up a window which asks which Pivot Table I would like (MissedDeadline(), Overdue() etc), upon selection it would then run the chosen macro and present the pivot table.

Any help would be greatly appreciated.

Kind Regards,

Simon
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I had a similar situation where I had to change the report depending on which department was looking at it.

I found that creating a userform to pop up when opening the spreadsheet (for you you will call it a the end of your populate data macro). Depending on selection the relevant macro will run. You can have a selection list or tick boxes depends on your preference.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,216,130
Messages
6,129,056
Members
449,484
Latest member
khairianr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top