+ Reply to Thread
Results 1 to 6 of 6

#REF Problem when cutting and pasteing

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    #REF Problem when cutting and pasteing

    Hi:

    I have a worksheet that has a range of cells that are linked to another worksheet.
    Every now and then I get a #Ref error on the worksheet in one of the cells.
    It seems like this is happening when someone cuts and pastes data from one cell to another within the linked group of cells.

    Example:

    Worksheet 1:
    Range("K4") linked to worksheet 2 Range("A4")
    Range("K5") linked to worksheet 2 Range("A5")
    Range("K6") linked to worksheet 2 Range("A6")
    Range("K7") linked to worksheet 2 Range("A7")

    When data is cut and pasted from say Range("K5") to ("K7") on worksheet 1
    It produces a #Ref error on worksheet 2 for the cell that K5 was linked to.

    Is there a way to prevent this maybe turn off cut and paste for a given range of cells with vba code?

    Thanks
    Charles

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about doing either a copy and paste (rather than a cut), or a copy and a value paste depending on your data and what you are trying to do.


    rylo

  3. #3
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    It isn't me that is causing this to happen

    Quote Originally Posted by rylo
    Hi

    How about doing either a copy and paste (rather than a cut), or a copy and a value paste depending on your data and what you are trying to do.


    rylo

    It isn't me that is causing this to happen the workbook is used by 8 differant people!
    I created the workbook they keep screwing up the cell references.
    I am looking for a way to dummy proof it so I won't have to fix it all the time.
    I can't lock those cells as they have to be able to type in them.


    Charles

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    to start with
    what's in k 5 /6/7?
    is it just data or a formula
    could you zip up and post an example?

  5. #5
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    Data is in these cells

    Quote Originally Posted by martindwilson
    to start with
    what's in k 5 /6/7?
    is it just data or a formula
    could you zip up and post an example?
    K4:K15 contain data on worksheet 1

    Worksheet 2 Range A4:A15 contain a formula that links worksheet 2 with worksheet 1

    ='Worksheet 1'!K4 is in worksheet 2 A4 and so on.



    Charles

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    i cant see why copy/cut.paste shouldnt work. unles the info in k5 ect is the result of some formula in those cells

+ 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