I am trying to make a macro that will query a column J4 for a date, if the date is found say "Wednesday, July 4, 2012" (J8)
get the text from Column K8 "Independence Day" and insert the text in Cell (H1).
The Macro Prints sign in sheets with the date in H2, it only prints Monday through friday.
then skips the weekend and the next date will start the following Monday.
The Federal Holiday schedule is in column range J (Date) and K (Holiday)
This is where I am stuck ....
EmployeeTimeSheet_2012.xlsm
Sub Print_Sheets()
Dim HolidayDate As HDate
Dim WeekDayDate As WDate
Dim Holiday As String
Dim ColumnCount As Integer
Dim RowCount As Integer
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Dim LSearchRow As Integer
Dim LCopyToRow As Integer
LSearchCol = J
LCopyToRow = 2
While Len(Range("J" & CStr(LSearchCol)).Value) > 0
'If value in column J = Cell H2, copy next Cell and paste to Cell H1
If Range("J" & CStr(LSearchRow)).Value = H2 Then
Cell(CStr(LSearchCol) & ":" & CStr(LSearchCol)).Select
Selection.Copy
Cell(H1).Select
ActiveSheet.Paste
End If
Wend
For i = 1 To 4
Range("H2") = Range("H2") + 1
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Next i
For n = 1 To 3
Range("H2") = Range("H2") + 1
Next n
End Sub
The Print Macro works fine, it's the date and holiday peice I am trying to get
Bookmarks