printing same page with multiple dates

  • Thread starter Thread starter dysart316
  • Start date Start date
D

dysart316

I am trying to print a vacation log with separate dates on the same
sheet. The sheet should look the same except for 1 cell that contains,
this cell should use a different date with each printed page. I have 1
sheet formatted the way I want with cell D3 being the date and another
sheet that contains all of the dates down row A1:A365 that I need a
sheet printed for. I am not familiar with macros and need some help if
that is the way to go. Using Excel 2003.
 
Sub printStuff()
Dim mainSheet As Worksheet
Dim dateList As Worksheet
Dim i As Integer
Set mainSheet = Sheets("MainSheet")
Set dateList = Sheets("DateList")
For i = 1 To 365
With mainSheet
.Range("D3").Value = _
dateList.Cells(i, 1).Value
.PrintOut
End With
Next i
End Sub
 
Sub printStuff()
Dim mainSheet As Worksheet
Dim dateList As Worksheet
Dim i As Integer
Set mainSheet = Sheets("MainSheet")
Set dateList = Sheets("DateList")
For i = 1 To 365
With mainSheet
.Range("D3").Value = _
dateList.Cells(i, 1).Value
.PrintOut
End With
Next i
End Sub




- Show quoted text -

Worked like a charm. Thanks for the quick reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top