Hey all,
I've been working on this for about a week and am having some troubles with the final steps. This is my very first attempt at VBA with ZERO experience with it, so please be kind if this is an extremely Noobie question.
I cannot for the life of me get the macro to copy the entire row. I know it has to be a something I'm doing wrong in the code. The closest I have come is getting the macro to copy a single cell. Below is the macro code as it sits right now. Any help would be very much appreciated.
![]()
Sub TestingPayrolldate() 'Declared Variables Dim payrolldate As Range Dim copyrange As Range Application.ScreenUpdating = False Range("F1").Select payrolldate = Application.InputBox(Prompt:="Please enter the Payroll Starting Date", Default:="YYYYMMDD") Do ActiveCell.Offset(1, 0).Select If ActiveCell.Value = payrolldate Then Range.Offset(0, -5)activecell.end (xltoright).Copy Workbooks.Add Selection.Paste ActiveCell.Offset(1, 0).Select Worksheets(Labor_Transfer_Table).Activate ElseIf payrolldate = "" Then MsgBox "No Payroll records with that Starting Date Exists" End If Loop Until ActiveCell.Value = "" MsgBox "Search Completed" Application.CutCopyMode = False Application.ScreenUpdating = True ActiveWorkbook.SaveAs "C:\Users\matt_f\Desktop\PaycorOnsite\Time_Clock_Import\Pre-conversion\Payroll", xlCSV ActiveWorkbook.Save MsgBox " has been created and saved" End Sub
Bookmarks