ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code to trigger drop down-select event (https://www.excelbanter.com/excel-programming/322854-code-trigger-drop-down-select-event.html)

Excel User

Code to trigger drop down-select event
 
I have a workbook that contains three worksheets:
a data table
a pivot table report of the data table (with the "Organization" field
located in the pivot table's Page field)
a switchboard with a drop-down box that contains the organizations listed in
the data table and pivot table

I need some code that selects the organization in the Organization page
field of the pivot table that corresponds to the organization selected from
the drop down. So, if one selects, say, "New York" from the drop-down box,
"New York" is selected from the pivot table Page field ("Organization") and
the pivot table refreshes to show New York-only data.

Thanks,
EU

Tom Ogilvy

Code to trigger drop down-select event
 
Turn on the macro recorder and change the value in the pagefield of the
pivot table.

Now turn off the macro recorder. Now generalize the code so the hard coded
value uses a variable that is populated with the value of the dropdown.

--
Regards,
Tom Ogilvy

"Excel User" wrote in message
...
I have a workbook that contains three worksheets:
a data table
a pivot table report of the data table (with the "Organization" field
located in the pivot table's Page field)
a switchboard with a drop-down box that contains the organizations listed

in
the data table and pivot table

I need some code that selects the organization in the Organization page
field of the pivot table that corresponds to the organization selected

from
the drop down. So, if one selects, say, "New York" from the drop-down box,
"New York" is selected from the pivot table Page field ("Organization")

and
the pivot table refreshes to show New York-only data.

Thanks,
EU





All times are GMT +1. The time now is 10:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com