index > Visual Basic for Applications (VBA) > Pivottable Drilldown Lists in wrong order (Excel, Pivottable)

Pivottable Drilldown Lists in wrong order (Excel, Pivottable)


I am using a Pivottable with external data in my Excel Sheet.

On the sheet I included a Button to refresh the pivottable via pv.RefreshTable

As there might be some new data, also the values of the drilldown lists may change. So when I initally created the pivot, I had these employees: Mister A, Mister B, Mister D, Mister F.

By clicking on "Refresh" some new data comes in, including Data from Mister C and Mister E. So the original drilldown list has:

(Show all)
- Mister A
- Mister B
- Mister D
- Mister F

after Clicking Refresh, the drilldown lists just added the 2 new employees:

- Mister A
- Mister B
- Mister D
- Mister F
- Mister C
- Mister E

How do I get them in the correct order, after refreshing the data?

( In reallity of course the list contains about 120 people and if you search for someone which name starts with "A", you won't start searching at the end of the list)

http://www.krasinger.at/public/drilldown.gif

Plz Help!

tkrasinger
up
tkrasinger

tkrasinger wrote:
up

can someone at least state that this simply doesn't work?

tkrasinger

Hi

Did you remember to go into the advanced settings on the field and change the sort order from manual to ascending? You can do this with VBA if required e.g.

ActiveSheet.PivotTables("PivotTable1").PivotFields("Date").AutoSort xlAscending _
, "Date"




ADG
ADG
reply 4

You can use google to search for other answers

 

More Articles

• last Modified date in Excel spreadsheet
• export lots of Access stored queries
• Memory issue with variable declaration in a macro to write from e...
• [URGENT] Need Help for "Error 1004: SaveAs Failed"
• VBA books
• "Custom" properties of office and other files...
• Need help with Winsocket control in Microsoft Access Database for...
• printing .doc, .xls, and .pdf files from a list of filenames usin...
• How long this forum exists?
• VB.Net to VBA?
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• If your users reference an XLA on the ne
• format field
• After_Save Event???
• Auto fit user form
• how to delete all names in workbook?
• Wanted - VBA Developer Banking Zurich
• pl help ,how to give warnings or Error M
• VBA Excel Module opening Access DB with
• ADO Connection in Ms Access
• accessing VBA code from VB.net application
• Please Help!! Excel driving me mad!
• Adding windows forms
• VB Script Crashes Access When Exporting
• Charts.Add method causing error
• ListParagraphs collection in table

Hot Articles

• "variable" to make Macro not a
• need help with email attachement
• Challenge writing a macro for setting Me
• Table Caption Property
• VB Control Air card sent file to GPRS
• AutoResize Merged Cells
• Exporting Text to Webserver
• Count the rows
• VBA Editor Crashed
• Find worksheets starting with "xxxx
• Is there a way to select..
• Combo Box Issue
• VBA TaskBox (Windows XP) & HTML Mult
• VBA Excel/Oracle query and run-time erro
• Disable events in userform

Recommend Articles

• MS Access VBA: How to solve the problem,
• partly remove the code from VBComponents
• DataGridView ComboBox Problem
• Copying selected Worksheets to new workb
• Question about ADO and Access
• MultiPage problem!
• A vector of vectors
• how to delete all names in workbook?
• How to dial a modem and pass a .wav file
• How to #include text into a source code?
• Adding a table column using VBA in Access
• Deleting tabs when a cell is emptied
• Help with highlighting employees nominat
• Excel VBA - Worksheet_Change problem?
• SaveAs help