Results 1 to 6 of 6

Help Fixing Copy/Paste VBA

Threaded View

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    Help Fixing Copy/Paste VBA

    I have this code that I need to tweak a few things on.
    1. I need it to work regardless of the tab name, having some troubles when I take out the worksheet name.
    2. The goal is to copy rows 7:37 and paste in the next available row the selected number of times, but it's not doing it.

    here's the code:

    Sub Copy_7_to_37_Paste_in_First_Blank_Row()
    
    Dim NextRow As Long
    
    With Worksheets("Dept.Store")
    NextRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
    End With
    
    rDstNr = InputBox("How many times shall I paste it?", "Row Paster...", 1)
    Worksheets("1").Range("a7:ac37").Copy _
    Destination:=Worksheets("1").Cells(NextRow, "a")
    
    End Sub
    Last edited by juniperjacobs; 11-07-2011 at 12:30 PM. Reason: SOVLED

Thread Information

Users Browsing this Thread

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

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