Is this possable

  • Thread starter Thread starter MeganR
  • Start date Start date
M

MeganR

I have a spreadsheet in excell that I want to print with todays date on
it as
a header and then some how be able to print one for each day for the
rest of
the year. I dont want to have to print it each day, or make a copy of
it and
change the date everyday. I want to be able to print the whole thing
today
with just this one copy that I have in excell. Please help.

I am ot running a macro nor have I ever. Do I need to?
 
MeganR said:
I have a spreadsheet in excell that I want to print with todays date on
it as
a header and then some how be able to print one for each day for the
rest of
the year. I dont want to have to print it each day, or make a copy of
it and
change the date everyday. I want to be able to print the whole thing
today
with just this one copy that I have in excell. Please help.

I am ot running a macro nor have I ever. Do I need to?

Hi there,

I don't know wheter there's a clever way without use of any macros, but
surely the below code will solve your problem.
'---------------
Sub MyPrinterMacro()

Dim currCount As Long
Dim currDate As Date
currDate = 0


While currCount <= DateDiff("d", Now, "31.12.2006")
currDate = DateAdd("d", currCount, Now)



With ActiveSheet.PageSetup
.CenterHeader = Year(currDate) & "/" & Month(currDate) & "/" &
Day(currDate)

End With

currCount = currCount + 1

Wend

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
'---------------


HTH,

Thiery
 
Here is a macro that starts with today's date. It increments the date until
the end of the year. For each incrementation, the date is placed in the
header and the sheet printed:


Sub Macro1()
' gsnu
Dim d As Date
Dim s, s1 As String
d = Now()
For i = 1 To 365
s = d
y = Year(d)
If y = 2007 Then
Exit For
End If
s = Split(s)
s1 = s(0)
With ActiveSheet.PageSetup
.CenterHeader = s1
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
d = d + 1
Next
End Sub
 

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

Back
Top