Loading
Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports



Results 1 to 2 of 2

Thread: Run-time error 1004 Table Cannot Overlap A Range...

  1. #1
    Join Date
    9th December 2010
    Posts
    8
    Usergroup
    Registered Users

    Run-time error 1004 Table Cannot Overlap A Range...

    I used the macro recorder in Excel 2007 to record the code below. The code is supposed to use a .iqy to pull data from a SharePoint 2007 site. When I run the macro, I receive the following error: A table cannot overlap a range that contains a PivotTable report, query results, protected cells or another table. I have no issue running the .iqy query from excel without using the macro. Any idea what's causing the 1004 error?


    Sub Macro1()
    With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
    "OLEDB;Provider=Microsoft.Office.List.OLEDB.2.0;", Destination:=Range("A1"))
    .QueryTable
    .CommandType = 5
    .CommandText = Array( "{9848425C-7548-45D7-97F6-0F39962103AD}{F0102C5F-57BF-4023-B2D0-FF93F04A0030}

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    9th December 2010
    Posts
    8
    Usergroup
    Registered Users

    Re: Run-time error 1004 Table Cannot Overlap A Range...

    Sorry, my code kept getting cut off with or without code tags. See Macro1 in attached file to examine the full code I'm using.

    Thanks!
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 5
    Last Post: December 22nd, 2010, 21:08
  2. Replies: 2
    Last Post: May 22nd, 2007, 08:50
  3. Replies: 4
    Last Post: August 7th, 2006, 21:47
  4. Run-time Error '1004' : Select method of Range class failed
    By Gil Petruska in forum Excel General
    Replies: 3
    Last Post: July 29th, 2006, 15:41
  5. VBA: Run-Time Error '1004'
    By spnz in forum Excel General
    Replies: 5
    Last Post: August 12th, 2003, 23:19

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
  •  
porno