I work in a hotel and I have created a form in Excel to record guest's requests for wake-up calls. The form is very simple with just a list of all the room numbers in the hotel with a space after the room number to write in the wake-up time. At the top of the form, there is a date field where I enter the date. I print 30 copies of these forms ahead of time for the next 30 days and then handwrite the date at the top of each page. The forms are then stored in a file cabinet until needed (one for each day). Every page is identical when printed.
What I would like to do is: write a routine (perhaps VBA) that would let me enter the date I want to appear on the first copy of the form and then have the form print 30 times with a printed date at the top of each form starting with the date I entered and then bumping the date up one day for each copy of the forms. For example: If I entered 3/15/13, the first page would print 3/15/13, the second 3/16/13 and so on ending with the last paging having the date 4/14/13 (or whatever the 30th day is). This is simple if I just cut and paste the form over and over in the file and then put a formula in the date field of the 2nd through 30th pages that bumps up the date by one. However, this makes for a rather large file and will be very awkward if I ever need to change the form. I don't want to have to make the change on all 30 copies.
This all has to be accomplished in Excel 2003 since that is the version that the hotel has on their computer.
Is what I want to do practical? Or even possible? I am very comfortable with Excel formulas, but I don't know Visual Basic. However, I am a retired programmer (mostly C, C++, C# on Linux) so if someone can give me a idea on how to do this in VBA I can probably figure out how to implement it. It would also be nice if I could enter the number of pages I want to print instead of having it locked in at 30, but that is not a requirement. I am thinking a For Loop with a variable for the range would work for that.
Any help appreciated.
Thanks,
Jack
Bookmarks