davidcchambers
New Member
- Joined
- Nov 22, 2011
- Messages
- 1
Hello everyone --
I am new to VBA (four days now) and have put together a relatively simple macro that creates a pivot table. I have found that I can select one of the options in the .xlPageFile (which are dates i.e. 11/17/2011, etc.) by using .PivotFields.CurrentPage = "nnnnnnnn" which is great but what I really want to do is create an InputBox (or some kind of User Input interface) for the User to input a date range and have the Pivot Table select those dates in the .xlPageFile.
Any ideas?
I use Windows Vista with Excel 2010.
Code Snippet --
I am new to VBA (four days now) and have put together a relatively simple macro that creates a pivot table. I have found that I can select one of the options in the .xlPageFile (which are dates i.e. 11/17/2011, etc.) by using .PivotFields.CurrentPage = "nnnnnnnn" which is great but what I really want to do is create an InputBox (or some kind of User Input interface) for the User to input a date range and have the Pivot Table select those dates in the .xlPageFile.
Any ideas?
I use Windows Vista with Excel 2010.
Code Snippet --
Code:
ActiveSheet.PivotTables("DBOSPivotTable").PivotFields("Date"). _
EnableMultiplePageItems = True
Worksheets("DBOS").PivotTables("DBOSPivotTable").PivotFields("Date"). _
CurrentPage = "11/18/2011"