Results 1 to 2 of 2

Problems with VBA-pivot

Threaded View

kifin Problems with VBA-pivot 02-22-2007, 05:29 AM
Loz Try the following.... ... 02-26-2007, 06:01 AM
  1. #1
    Registered User
    Join Date
    02-22-2007
    Posts
    1

    Problems with VBA-pivot

    Hey - I'am new on this forum and my english isn't very good but i really hope someone can help me on this matter:

    For each row in colums 21 I have a key - f.ex. 5107021. This key I what to choose in pivot drill down but the text marked with red crash because i can't change this part of an pivottable. But in an pivot drill down i can type 5107021 (menual)an this works. So whats the code for typing in a privot drill down??

     
        Columns("A").Select
        With Worksheets(1).Range("A:A")
        Set C = .Find(1, LookIn:=xlValues)
        If Not C Is Nothing Then
            firstaddress = C.Address
            Do
            Selection.Find(What:="1", After:=ActiveCell, LookIn:=xlValues, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
                False).Activate
                
      ActiveSheet.PivotTables("PivotTable1").PivotFields("Key nr").CurrentPage = _
                ActiveCell.Offset(0, 21)[/COLOR]            
                
                Set C = .FindNext(C)
                Loop While Not C Is Nothing And C.Address <> firstaddress
            End If
         End With
    Last edited by VBA Noob; 02-22-2007 at 05:40 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1