Date macro

L

Lana

Hi
I have a form for scheduling conference rooms and would like to have a macro that would create a unique date at the top of this form for every day of the year with the day of the week first, followed by the day (e.g, Wednesday, May 26, 2004). I would like the option to start with any date I wanted to and print for as many days as I wanted to (e.g., start with January 1 for 180 days or start with November 4 for 30 days, etc.). Of course, I am perfectly willing to change these parameters manually within the macro if necessary (to simplify the code). In addition, I would like it to skip Saturday and Sunday. Anyone have something like this?
 
S

Suzanne S. Barnhill

An easy approach would be to set up a mail merge using an Excel spreadsheet
as the data source. It's easy to create lists of dates in any desired format
in Excel. In this case, you would enter the Monday through Friday, then the
next Monday (to show Excel you want to skip weekends), then drag to
AutoFill. If necessary, Format | Cells to apply the desired date formatting.
To create the mail merge, select the desired records (dates) and Merge to
New Document.



Lana said:
Hi,
I have a form for scheduling conference rooms and would like to have a
macro that would create a unique date at the top of this form for every day
of the year with the day of the week first, followed by the day (e.g,
Wednesday, May 26, 2004). I would like the option to start with any date I
wanted to and print for as many days as I wanted to (e.g., start with
January 1 for 180 days or start with November 4 for 30 days, etc.). Of
course, I am perfectly willing to change these parameters manually within
the macro if necessary (to simplify the code). In addition, I would like it
to skip Saturday and Sunday. Anyone have something like this?
 
L

Lana

Hi Suzanne
Thanks for the tip. Didn't work like I expected, but using the Day of Week in 1 column and the Date in another, then using the fill feature with the Weekdays option I was able to generate a spread sheet datasource. Then the mailmerge from Word worked just fine. Simple solution to a complex coding problem. Thank you again
Lana
 
S

Suzanne S. Barnhill

Glad you got it figured out given the exiguous and faulty lead I gave you!



Lana said:
Hi Suzanne,
Thanks for the tip. Didn't work like I expected, but using the Day of
Week in 1 column and the Date in another, then using the fill feature with
the Weekdays option I was able to generate a spread sheet datasource. Then
the mailmerge from Word worked just fine. Simple solution to a complex
coding problem. Thank you again.
 

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

Top