Results 1 to 3 of 3

Thread: Problem with Pivot Table

Threaded View

  1. #1

    Thread Starter
    Addicted Member Fonty's Avatar
    Join Date
    May 2006
    Location
    New York
    Posts
    173

    Arrow Problem with Pivot Table

    I have the following code, where count is a string defined in order to get some data from a pivot table field:

    VB Code:
    1. If other = 0 Then
    2. ' first I fill some cells with content 1
    3. Range("B" & 58 + s).Value = Worksheets("Constants").PivotTables("tablereg").GetData(count)
    4. ElseIf other= 1 Then
    5. ' first I fill some cells with content 2
    6. Range("B" & 58 + s).Value = Worksheets("Constants").PivotTables("tablereg").GetData(count)
    7. End If

    The problem is that for other = 0 the code works perfect, it gets the values from the pivot table. However, for other = 1 it crashes and pops up a error mesage saying that there's a missing bracket. Why does this happen? The code is exactly the same as for other = 0. Simply a copy/paste.
    Last edited by Fonty; May 30th, 2006 at 05:32 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width