Activating Macro [Solved/Closed]

Report
-
 Trowa -
Hello,

I have made a calender which I want to prepare for next year with the press of a button.

Here is the file: https://authentification.site/582501305.html

When I run the macro "JaartalVerhogen", the current year will rise by one. This will change the dayname of each day. According to the dayname the columns change color.

Since I have more than 3 colors, I had to use a complicated VBA code (provided by Aquarelle on this website)
which has been put under ThisWorkbook when looking at the vba codes.

Now my problem: The colors will only change when I have selected the sheet and copy paste a formula in the same cell.

I want the colors to change when the macro "JaartalVerhogen" is fired.

The worksheet calculate event seems to be the solution, but how do I use it in this situation?

Please let me know if something is still unclear.

Best regards,
Trowa

3 replies

Posts
185
Registration date
Tuesday November 18, 2008
Status
Member
Last seen
August 6, 2010
29
I would like to help you but i don't understand your language :S
I didn't think it would be necessary to understand my language to help me.

Please let me know if you need anything translated?
In a bright moment I found the answer:

I used this code:

Sheets("Januari").Range("C5").Formula = Sheets("Januari").Range("C5").Formula

I have altered it into:

Sheets("Januari").Select
Range("C5").Formula = Range("C5").Formula

Case solved