+ Reply to Thread
Results 1 to 2 of 2

Range object global failure

  1. #1
    Otto Moehrbach
    Guest

    Range object global failure

    Excel 2002, WinXP
    I have a "With/End With" statement such as:
    With Sheets("One")
    Range(Range("CellName"), Range("CellName").Offset(65)).Copy_
    ..Range(DateCell.Address).Offset(8)
    End With
    The underline character is just for this message.

    I was getting the following error on the above statement until I put the
    entire statement on one line. I had been putting "Copy _" and continuing on
    the next line.
    get Run-time error '1004'
    Method 'Range' of object '_Global' failed

    Now my user is getting this error with my code.

    "CellName" is the range name of a cell in another sheet.
    DateCell is a single-cell range variable. The parent sheet is yet another
    sheet. I'm using just the cell address of this cell and pasting the data to
    this address in the "One" sheet.

    What is wrong with the above Copy/Destination statement? Thanks for your
    help. Otto



  2. #2
    Toppers
    Guest

    RE: Range object global failure

    I assume you copying to Datacell so you need to add " destination:=" as below

    Range(Range("CellName"), Range("CellName").Offset(65)).Copy_
    destination:=Range(DateCell.Address).Offset(8)

    HTH

    "Otto Moehrbach" wrote:

    > Excel 2002, WinXP
    > I have a "With/End With" statement such as:
    > With Sheets("One")
    > Range(Range("CellName"), Range("CellName").Offset(65)).Copy_
    > ..Range(DateCell.Address).Offset(8)
    > End With
    > The underline character is just for this message.
    >
    > I was getting the following error on the above statement until I put the
    > entire statement on one line. I had been putting "Copy _" and continuing on
    > the next line.
    > get Run-time error '1004'
    > Method 'Range' of object '_Global' failed
    >
    > Now my user is getting this error with my code.
    >
    > "CellName" is the range name of a cell in another sheet.
    > DateCell is a single-cell range variable. The parent sheet is yet another
    > sheet. I'm using just the cell address of this cell and pasting the data to
    > this address in the "One" sheet.
    >
    > What is wrong with the above Copy/Destination statement? Thanks for your
    > help. Otto
    >
    >
    >


+ Reply to Thread

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