Results 1 to 22 of 22

Help with a VBA macro ending with a LOOP

Threaded View

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Help with a VBA macro ending with a LOOP

    Hi Guys

    I have a macro created and it starts on the cell which the user specifies and ends on the cell below. Is there a way in which i can have it looped until the end cell is empty?

    Many Thanks

    Shil



    --------------------------------


    Sub moverec()
    '
    ' moverec Macro
    '
    ' Keyboard Shortcut: Ctrl+m
    '
        ActiveCell.Offset(0, 36).Range("A1:BE1").Select
        Selection.Copy
        Sheets("Bank File").Select
        Range("A1").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(1, 0).Range("A1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        ActiveCell.Offset(-1, 0).Range("A1:D1").Select
        Application.CutCopyMode = False
        Selection.Copy
        ActiveCell.Offset(2, 0).Range("A1").Select
        ActiveSheet.Paste
        Sheets("Payroll Calculatios").Select
        ActiveCell.Offset(1, -36).Range("A1").Select
    End Sub
    Last edited by 5h1l; 07-11-2012 at 11:33 AM. Reason: Use code tags in future.

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