Results 1 to 2 of 2
  1. #1
    mkc80 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    56

    Run Time Error 1004: Method Range of Object _Global Failed

    Hello,

    I am trying to run reports in Access 2007 Database (output is an Excel file) one after the other.
    The first report works perfectly, but when I try to run the second report, I get the error
    "Run Time Error 1004: Method Range of Object _Global Failed"

    (Both of these reports are same except the first report is for 1Month Sales and Second Report is for 6 Months).

    I have to close and re-open the database every time I need to run these reports one after the other.

    Here is the code:

    'Rearrange Columns


    .Range("E:F").Select
    .Selection.Cut
    .Range("M:N").Select
    .ActiveSheet.Paste
    .Range("G:N").Select
    .Selection.Cut Destination:=Range("E:L") (This is where code fails when the second report is run with the above error message)

    I have googled the error but couldn't find a satisfactory answer...

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Not too familiar with Excel VBA yet, but should Range("E:L") not have a period before it, as all your other .Range .... do, i.e. .Range("E:L") ?

    John

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Run-time error 1004
    By Kirsti in forum Programming
    Replies: 10
    Last Post: 04-01-2012, 09:58 PM
  2. Replies: 4
    Last Post: 01-27-2012, 02:16 AM
  3. Method InsideHeight of object PlotArea failed
    By dgardineer in forum Programming
    Replies: 1
    Last Post: 10-26-2011, 01:52 PM
  4. Replies: 7
    Last Post: 02-03-2011, 07:13 AM
  5. Replies: 2
    Last Post: 02-28-2009, 03:31 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
  •  
Other Forums: Microsoft Office Forums