+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    120

    Exclamation Spinner Link Cell Doesnt Change when i Copy and Paste the Row

    Hi All

    I have a Piece of Code that copys a Row in my Spreadsheet and Pastes it underneath the original Row.

    The Problem that I am having is that within the Row it Copys there is a Spinner in it. I want the Spinner to be copied also but the Cell that the Spinner is Linked to Says as the Original Cell, it doesnt move Down with the New Row Pasted in.

    Here is the code that i have written to Copy the Row and Paste it down a Row.

    Code:
    Sub NEXT_LINE()
    
    Dim LROW As Double
    
    Let LROW = Sheets("Sheet1").Range("B65536").End(xlUp).Row
    
    Range(Cells(LROW, 2), Cells(LROW, 9)).Select
    Selection.Copy
    Cells(LROW + 2, 2).Insert
    Application.CutCopyMode = False
    
    Cells(LROW + 2, 2).Select
    Selection.ClearContents
    
    End Sub
    I have also Included an Example of how I am using it.

    I have a Macro button that runs the code and copys the row with the formulas and Spinner and inserts them underneat which is what I want, but I also want the spinner Link cell to change with it.


    Thanks For all your Help

    Tom.
    Attached Files Attached Files
    Last edited by t0m46; 01-28-2010 at 07:25 AM.

  2. #2
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,447

    Re: Spinner Link Cell Doesnt Change when i Copy and Paste the Row its in!!!!

    Where's the example?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  3. #3
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    120

    Re: Spinner Link Cell Doesnt Change when i Copy and Paste the Row its in!!!!

    Sorry Forgot, It is there Now.

    Thanks

  4. #4
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    120

    Re: Spinner Link Cell Doesnt Change when i Copy and Paste the Row its in!!!!

    Bump!!! Bump!!!

  5. #5
    Forum Moderator romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Alibi
    MS-Off Ver
    All
    Posts
    8,262

    Re: Spinner Link Cell Doesnt Change when i Copy and Paste the Row its in!!!!

    Try adding this line before your End Sub:
    Code:
    ActiveSheet.Spinners(ActiveSheet.Spinners.Count).LinkedCell = Cells(LROW + 2, 4).Address
    So long, and thanks for all the fish.

  6. #6
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    120

    Talking Re: Spinner Link Cell Doesnt Change when i Copy and Paste the Row

    Hey,

    Thanks, That worked great!!!

    Thanks alot

    Tom

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.2.0