Results 1 to 2 of 2

Run-Time Error 1004 Method Range of object _Global Failed?

Threaded View

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    3

    Unhappy Run-Time Error 1004 Method Range of object _Global Failed?

    Hi There,

    hope your well, Im new to Macro's and im getting a little confused,

    I and trying to copy data from active sheet as I have over 60 sheets...1sheet.named (Orig1.xls) (in say E7) to the last/Next Availabe row in another spreadsheet.ie Test2.xls using excell 2000. I have attached my code if it helps, can anyone guide me or point me to my error would be greatly appreciated. Thanks for reading.

    Sub Macro5()
    '
    '
    Range("A2").Select
    Workbooks.Open Filename:="H:\Test2.xls"
    Application.Run Range("ScOnWindow")
    Windows("Orig1.xls").Activate
    Application.Run Range("ScOnWindow")
    Selection.Copy
    Windows("Test2.xls").Activate
    Application.Run Range("ScOnWindow")
    Selection.End(xlDown).Select
    Range("A6").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveWorkbook.SaveAs Filename:="H:\Test2.xls", FileFormat:=xlNormal, _
    Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
    CreateBackup:=False
    Windows("Orig1.xls").Activate
    Application.Run Range("ScOnWindow")
    Range("B2").Select
    Selection.Copy
    Windows("Test2.xls").Activate
    Application.Run Range("ScOnWindow")
    Range("B6").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveWorkbook.Save
    ActiveWorkbook.Close
    Application.Run Range("ScOnWindow")
    ActiveWorkbook.Save
    End Sub
    Thanks Again
    Last edited by pike; 02-11-2011 at 01:41 AM. Reason: add code tags for newbie PM warning

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