• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Calendar Help

dtek

New Member
Hey there, I have a monthly calendar workbook that contains two sheets. The first sheet is a data table and the second sheet is the monthly calendar which displays the data from the table. I have userforms that make data entry easy. I cannot figure out how to make the calendar display the data with the cell’s full color equal to the value of the “Color Code” column in the table. Also, when I click on a date to start editing the data, the userform messes up the date format.
 

Attachments

  • Activity Planner.xlsm
    128.5 KB · Views: 20
dtek
As a new member,
You have forgotten few basic things: Use Relevant words in the Title and in the tag Box, This will aid future searches.
You should reread Forum Rules
 
Dtek, I glanced at your workbook but I don't see the table you speak of, the one that specifies colors. You'll have to steer me a little.
 
Bob, thank you for the reply. The table is on the first sheet and contains a column named “Colors”, it’s towards the middle/end of the table.
 
The first sheet is named "Activity Planner"? I see no column there named "Colors", but column I is headed "Color Code"; is that the one you mean?

And I suppose that somewhere in your code you select a row from the worksheet Activity Planner, get the color code from that row, and then try to apply that code to a part of the calendar. But where in the code does that happen? There's a lot of code there, and it isn't obvious to me where you're attempting to set the color in the calendar. What module and procedure is that in?
 
Sorry Bob, I haven’t been on my computer until now.
If you hit the “Add New” button on Sheet1(“Activity Planner”), a userform pops up. You enter all the data you want on the userform and hit “Select Color” to make a color picker popup. Select your color then hit “Add”.

The data is then exported to the table also on Sheet1(“Activity Planner”). The color that you selected is saved in Column “I” named “Color Code”.

What I’m trying to do is have that color code display with the event on the “Calendar” sheet. Right now, the color is set by condition formatting instead of being set by code. Also, when I click on an event to edit the data, the date format is all messed up.

I’ve attached a new workbook that has some test data already entered into the table.
Thank you,
 

Attachments

  • Activity Planner UPDATED.XLSM
    142.3 KB · Views: 26
I see the sheet named "Activity Planner", but I don't see a button on it labeled "Add New".

But regardless, I wasn't asking what actions the user might take to get to the part of the code that attempts to change the color. I'm asking where in the code it happens. What is the name of the module and procedure? I don't know where to look for it. If I see the part of the code that isn't working right, maybe I'll be able to see what you're doing wrong.
 
Back
Top