Forum

Assigning a macro t...
 
Notifications
Clear all

Assigning a macro to a shape instead of a list box on my dashboard

7 Posts
4 Users
0 Reactions
62 Views
(@cfayder)
Posts: 3
Active Member
Topic starter
 

I would like to have the macro change a filter my pivot but instead of a list box (my list box would have over 100 options), I would like the user to be able to enter a reference # on the dashboard and have the macro update the pivot based on what the user entered, am I able to do this?

This is what I tried

Dashboard tab – user enters reference # in cell O30
Pivot tab – cell G28 = cell O30 on the dashboard tab
I recorded/edited the macro and used G28 as my cell reference
Instead of assigning the macro to the list box on the dashboard tab, I assigned it to a shape (a “go” arrow).
The idea was to have the user enter the reference # on the dashboard, click go and the macro would update the filter on the pivot with what the user entered on the dashboard however it did not work.

If I use PivotFields(“Ref_Number”) in the macro editor, I receive a pivot field error.
My pivot is a power pivot so I tried using the table reference that it used when I recorded the macro and it still failed

Any help is appreciated

Thanks
Cindy

 
Posted : 23/09/2016 7:35 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Cindy,

Can you please upload a sample file?

Thanks

 
Posted : 23/09/2016 11:34 pm
(@cfayder)
Posts: 3
Active Member
Topic starter
 

Thanks Catalin, attached is the sample file

 
Posted : 24/09/2016 1:08 pm
(@fravis)
Posts: 337
Reputable Member
 

Sorry, can't find the sample file......

 
Posted : 24/09/2016 3:40 pm
(@cfayder)
Posts: 3
Active Member
Topic starter
 

Attached is the sample file - thanks again

 
Posted : 24/09/2016 9:54 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Cindy

Give this a try.

Just enter the promo code in the Dashboard sheet and click Go.

 
Posted : 24/09/2016 10:28 pm
(@sunnykow)
Posts: 1417
Noble Member
 

This updated version checks if the promo reference exist else it will prompt an error message.

Hope this is what you are looking for.

 
Posted : 24/09/2016 10:54 pm
Share: