I have a macro that displays a calendar with code to highlight the current date, but this part of the code does not work and the current date is not highlighted.
Suggestions?![]()
Please Login or Register to view this content.
Thanks,
jlcford
I have a macro that displays a calendar with code to highlight the current date, but this part of the code does not work and the current date is not highlighted.
Suggestions?![]()
Please Login or Register to view this content.
Thanks,
jlcford
Last edited by jlcford; 10-10-2008 at 02:00 PM.
What format is the inputbox expecting because it won't accept any variation of dates that I have tried.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I sorry I don't quite understand your question. I start out with a blank worksheet. I run the macro and type in the month and year of the calendar month I want to display. The Month and Year are displayed along with the dates 1 - 30 or 31 in cells C7:AM7 depending on what day of the week the month begins with.
jlcford
When the prompt for month & year comes up, what do you type in. I have tried 12/2008 and December 2008 and Dec 2008, all bring up the error message
"October 2008"
That is how the program is written. It only accepts that type of input.
Your Conditional Formatting can't work, the cells do not contain a date
Any suggestions on how to get them to show a date?
jlcford
Try this
![]()
Please Login or Register to view this content.
Last edited by royUK; 10-09-2008 at 05:52 AM.
I get a runtime error with this line of code.
The problem with using the reference DAY() (I have tried this before), is if I am looking in another calendar not the current month it highlights the "interger" of the current Day whether it is in the current month or not.![]()
Please Login or Register to view this content.
There has to be a way to write the code to populate the calendar days so they can be recognized as TODAY() - I am just haven't been able to figure it out.
jlcford
This works fine for me
![]()
Please Login or Register to view this content.
Sorry for the delay in my response. I was out of the office yesterday. Yes, you are correct this code works perfectly. Thanks for the help.
jlcford
Glad it worked for you
When I began working on my calendar I ran into a problem in October 2009. It highlighted October 10, 2009. So I added the following to my code:But then when I type in the Month and year in the InputBox, I get the error message from the on Error GoTo My Error Trap.![]()
Please Login or Register to view this content.
So I assume the code I have added the syntax is wrong. Again any suggestions.
Thanks,
jlcford
I would not use the error trap whilst developing the code. It throws the message whatever error is generated.
I think this does what you want
![]()
Please Login or Register to view this content.
Last edited by royUK; 10-10-2008 at 12:50 PM.
Thanks again for your help. I have posted the calendar through December 2009 with no problems.
jlcford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks