+ Reply to Thread
Results 1 to 5 of 5

Test If ColumnRange Object Exists

  1. #1
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Test If ColumnRange Object Exists

    Hi all,

    Using Excel 2010, 2013.

    I need to test if a PivotTable has a ColumnRange, but I keep receiving an error message
    Run-time error '1004':
    Unable to get the ColumnRange property of the PivotTable class
    What might I be doing wrong?

    thx
    w

    Please Login or Register  to view this content.
    Kind regards,
    w

    http://dataprose.org

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Test If ColumnRange Object Exists

    goss

    If the ColumnRange doesn't exist then you can't refer to it using .PivotTables(i).ColumnRange.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Test If ColumnRange Object Exists

    Thanks Norie,

    I guess I do not understand why I cannot test if it does not exist?
    In the end I'll use this code, but I am not a fan of handling errors with "Resume Next"

    thx
    w

    Please Login or Register  to view this content.
    Last edited by goss; 07-07-2013 at 09:54 PM. Reason: typo

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Test If ColumnRange Object Exists

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Test If ColumnRange Object Exists

    Thanks JosephP,

    That is working great!

    w

+ Reply to Thread

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