Hi Members of MrExcel,
I am in need of help and unable to loop my sheet.
I have a workbook with 3 sheets
1) Input
2) Front
3) Printt
In the "Input" i have to columns G and H with Dates for the month
I am trying to paste the value from
Sheets("Input").Range("G2") into Sheet ("Printt").Range("A1") & Sheets("Input").Range("H2") into Sheet("Printt").Range("J1")
The "Printt" worksheet will then print and loop to the next following cell G3 and H3 until last row.
However, the code did not manage to pull information for the next row.
Hopefully someone can help point out my mistake.
THanks a lot. New to VBA
Below is my code:
I am in need of help and unable to loop my sheet.
I have a workbook with 3 sheets
1) Input
2) Front
3) Printt
In the "Input" i have to columns G and H with Dates for the month
I am trying to paste the value from
Sheets("Input").Range("G2") into Sheet ("Printt").Range("A1") & Sheets("Input").Range("H2") into Sheet("Printt").Range("J1")
The "Printt" worksheet will then print and loop to the next following cell G3 and H3 until last row.
However, the code did not manage to pull information for the next row.
Hopefully someone can help point out my mistake.
THanks a lot. New to VBA
Below is my code:
VBA Code:
Sub Attendance()
Worksheets("Printt").Range("A1") = Worksheets("Input").Range("G2")
Worksheets("Printt").Range("J1") = Worksheets("Input").Range("H2")
Worksheets("Input").Range("G2").Select
Dim irow As Integer
irow = 2
Do Until IsEmpty(Cells(irow, 7))
Worksheets("Input").Range("H2").Select
Do Until IsEmpty(Cells(irow, 8))
'AutoPrint Macro
Worksheets("Front").PrintOut
Worksheets("Printt").PrintOut
'End AutoPrint
irow = irow + 1
Cells(irow, 7).Select
Loop
Loop
End Sub