Results 1 to 3 of 3

Copy/Paste textboxes into alternate rows

Threaded View

JoeVanGeaux Copy/Paste textboxes into... 03-07-2017, 12:51 AM
JoeVanGeaux Re: Copy/Paste textboxes into... 03-07-2017, 12:17 PM
JoeVanGeaux Re: Copy/Paste textboxes into... 03-07-2017, 04:55 PM
  1. #3
    Registered User
    Join Date
    02-03-2017
    Location
    SE Texas
    MS-Off Ver
    2013
    Posts
    98

    Re: Copy/Paste textboxes into alternate rows

    Having some success with code below. But can't get it to move to next row. (It does make many repeated inserts into same place, though.) The commented-out section works but this would mean I'd have to insert about 650 groups of code...twice, because I have a nearly identical second worksheet. I would then be able to tackle the "Selection.Formula" part afterwards.

    Private Sub InsertNewLinkedTextBoxes2()
    '
    '
    Dim c As Range
    Dim rng As Range
    Set rng = Selection
    
        For Each c In rng
            c = RowCount
            RowCount = RowCount + 1
                    
        'FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
            For i = 2 To 8 Step 2 'trying to limit range for now original code:"FinalRow Step 2"
        
                ActiveSheet.Shapes.Range(Array("TextBox 1")).Select
                Selection.Copy
                ActiveWindow.SmallScroll Down:=3
        
                Range("C5:G5").Select
                ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
                    False, DisplayAsIcon:=False
                Selection.ShapeRange.IncrementTop 137.25
                Selection.Formula = "=Sheet2!G5"
                ActiveWindow.SmallScroll Down:=3
                
            Next i
        Next
        
    '    Range("C7:G7").Select
    '    ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
    '        False, DisplayAsIcon:=False
    '    Selection.ShapeRange.IncrementTop 137.25
    '    Selection.Formula = "=Sheet2!G7"
    '    ActiveWindow.SmallScroll Down:=3
    '
    '    Range("C9:G9").Select
    '    ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
    '        False, DisplayAsIcon:=False
    '    Selection.ShapeRange.IncrementTop 137.25
    '    Selection.Formula = "=Sheet2!G9"
    '    Range("C9:G9").Select
        
    End Sub
    Attached Files Attached Files
    Last edited by JoeVanGeaux; 03-07-2017 at 04:57 PM. Reason: Forgot to include updated Workbook

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. cut and paste alternate rows
    By jen0dorf in forum Excel General
    Replies: 7
    Last Post: 03-24-2016, 04:07 PM
  2. Copy paste userform textboxes to word
    By welshman010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2014, 10:45 PM
  3. Copy and paste based on multiple input/textboxes
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 08:43 PM
  4. Copy and paste specific range to date specific range in alternate sheet
    By alanalmarza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 08:29 AM
  5. [SOLVED] paste in multiple alternate blank rows
    By system in forum Excel General
    Replies: 5
    Last Post: 10-15-2012, 03:30 PM
  6. Replies: 2
    Last Post: 02-22-2011, 02:07 AM
  7. [SOLVED] Select alternate rows to copy
    By Christina in forum Excel General
    Replies: 4
    Last Post: 01-26-2005, 10:07 PM

Tags for this Thread

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