Results 1 to 4 of 4

Run-time error '1004' help. Thank you

Threaded View

  1. #1
    Registered User
    Join Date
    06-05-2019
    Location
    Sterling, Virginia
    MS-Off Ver
    365
    Posts
    2

    Run-time error '1004' help. Thank you

    Hi all,

    I'm attempting to write a macro that puts data into a pivottable automatically. This seems pretty simple, but I can't quite figure it out. I think there is a problem with the name of the table and location its going to? I'm not to sure. I'm getting the Run-time error '1004' Application-defined or object-defined problem or run-time error '5' Invalid Procedure Calls or Argument. Thank you for the help. Here is the code:

    Sub RegEd()
    '
    ' RegEd Macro
    '
    ' Keyboard Shortcut: Ctrl+q
    '
    Application.CutCopyMode = False
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
    "Table1", Version:=6).CreatePivotTable TableDestination:="Sheet1!R4C22", _
    TableName:="PivotTable4", DefaultVersion:=6
    Sheets("Sheet1").Select
    Cells(4, 22).Select
    With ActiveSheet.PivotTables("PivotTable4")


    Thanks again
    Last edited by tommy1103; 06-05-2019 at 03:00 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] I am getting error as "Run Time error '1004' Microsoft excel cannot paste the data
    By Amittapre in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 03-24-2017, 04:40 PM
  2. [SOLVED] Sort Macro Run-time error '1004': Application/Object-defined error.
    By sam1212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2014, 10:05 AM
  3. Addon error : Run-time error '1004': Method 'MacroOptions' of object '_Application' failed
    By jtcoleman in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 02-05-2014, 12:23 PM
  4. Replies: 4
    Last Post: 11-15-2013, 05:03 PM
  5. VBA Code...error = run time error 1004 autofilter method of range class failed
    By Dariusd7 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2013, 04:49 PM
  6. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  7. run-time error '1004': Application-defined or object-deifined error
    By rich5665@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2005, 05:05 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