Results 1 to 11 of 11

Running Macro to copy Rows of Formulas

Threaded View

  1. #3
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Quote Originally Posted by VBA Noob
    See if link helps

    http://www.rondebruin.nl/copy1.htm

    VBA Noob
    I am sure the code should work but because I am new to macro's, I might be missing something here.

    Here's what I want to do, I want to copy the information from Row number 1 located in the sheet called IWLog and paste the information in an empty row as Values in the sheet called Log.

    Thank you.

    Here's my code:
    Sub Copy_1_Value_PasteSpecial()
        Dim SourceRange As Range, DestRange As Range
        Dim DestSheet As Worksheet, Lr As Long
    
        With Application
            .ScreenUpdating = False
            .EnableEvents = False
        End With
    
        'fill in the Source Sheet and range
        Set SourceRange = Sheets("IWLog").Range("A1:Z1")
    
        'Fill in the destination sheet and call the LastRow
        'function to find the last row
        Set DestSheet = Sheets("Log")
        Lr = LastRow(DestSheet)
    
        'With the information from the LastRow function we can
        'create a destination cell
        Set DestRange = DestSheet.Range("A" & Lr + 1)
    
        'Copy the source range and use PasteSpecial to paste in
        'the destination cell
        SourceRange.Copy
        DestRange.PasteSpecial xlPasteValues, , False, False
        Application.CutCopyMode = False
    
        With Application
            .ScreenUpdating = True
            .EnableEvents = True
        End With
    
    End Sub
    Last edited by cooh23; 11-11-2007 at 05:42 AM.

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