Thread: [Solved] Daily Task Sheet - help
View Single Post
 
Old 03-14-2013, 04:24 PM
Malissa1578 Malissa1578 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Mar 2013
Posts: 3
Malissa1578 is on a distinguished road
Default

Ok so I was messing around with the macro and cleaned it up a little bit. What I need to know is if Ican make this more generic to work with every row and not just the specified row and is there a generic code I can put in there to select the next available row to paste into on my completed tasks sheet?

here is the cleaned up macro....
Code:
Sub TaskCompleted() 
     '
     ' TaskCompleted Macro
     '
     '
    Sheets("Task Sheet").Select 
    Range("E5").Select 
    Selection.Copy 
    Sheets("Completed Tasks").Select 
    Range("A8").Select 
    ActiveSheet.Paste 
    Application.CutCopyMode = False 
    With Selection.Interior 
        .Pattern = xlSolid 
        .PatternColorIndex = xlAutomatic 
        .Color = 49407 
        .TintAndShade = 0 
        .PatternTintAndShade = 0 
    End With 
    Sheets("Task Sheet").Select 
    Range("B5:D5").Select 
    Selection.Copy 
    Sheets("Completed Tasks").Select 
    Range("B8:D8").Select 
    ActiveSheet.Paste 
    Range("A8:D8").Select 
    Application.CutCopyMode = False 
    With Selection.Font 
        .Name = "Calibri" 
        .FontStyle = "Regular" 
        .Strikethrough = True 
        .Superscript = False 
        .Subscript = False 
        .OutlineFont = False 
        .Shadow = False 
        .Underline = xlUnderlineStyleNone 
        .TintAndShade = 0 
        .ThemeFont = xlThemeFontMinor 
    End With 
    Sheets("Task Sheet").Select 
    Range("A5:E5").Select 
    Selection.ClearContents 
End Sub

Last edited by macropod; 03-19-2013 at 04:57 PM. Reason: Added code tags & formatting
Reply With Quote