+ Reply to Thread
Results 1 to 2 of 2

Identical VBA Code works on computer A, throws error on computer B???

  1. #1
    Registered User
    Join Date
    02-25-2014
    Location
    Burnaby, BC
    MS-Off Ver
    Excel 2010
    Posts
    29

    Identical VBA Code works on computer A, throws error on computer B???

    I have a really frustrating problem. My VBA code works fine at work, but when I run the exact same code on my PC at home, I get the following error when I get to the red line of code: "Run-time error 1004: Unable to get the PivotItems property of the PivotField class".

    The problem occurs in the code below, where the StartDate has been input via an InputBox as 10/1/2018 and the EndDate as 5/26/2019.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Please Login or Register  to view this content.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    At work I'm using Excel 2016 Standard, and at home I'm using Office 365 Home Excel Version 1809. I can get the red line of code to work at home if I change it to:

    Please Login or Register  to view this content.
    But then the error occurs on the next line, whether I use the original line or the modified line:

    Please Login or Register  to view this content.
    OR
    Please Login or Register  to view this content.
    This error confounds me, since my code is the same, only the computer and version of excel are different, and both the excel versions are quite current. I have attached 5 images in sequence to show the pivot table that I'm trying to filter. I can post more info if necessary, but I'm hoping there is a more holistic issue that someone can point out that may solve my problem. Any help that can be provided would be most appreciated! Thanks!
    Attached Images Attached Images
    Last edited by PWM; 10-12-2018 at 02:10 PM. Reason: Adding code tags!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Identical VBA Code works on computer A, throws error on computer B???

    Please edit your original post and add code tags to the code.
    -------
    AA CodeTags.jpg

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-18-2018, 08:20 AM
  2. Disable Insert button code works fine, but some times throws Run-Time error '5'
    By challasl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2016, 05:41 AM
  3. 8 Line Code Works On Other Computer, Not Mine
    By Relmiw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2014, 09:45 PM
  4. Replies: 7
    Last Post: 12-13-2013, 03:37 PM
  5. VLookup works in my computer, but not in another user computer.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2013, 04:41 PM
  6. Replies: 6
    Last Post: 06-28-2013, 08:44 PM
  7. Auto Filter on my home computer differs from my work computer.
    By Sbova0226 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2009, 03:04 PM

Tags for this Thread

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