View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Simonds Patrick Simonds is offline
external usenet poster
 
Posts: 258
Default Calendar problem

You are right (based on the starting point I provided). I should have used a
better example. If you were to start with the second Tuesday of March on
Calendar1, when you got to Calendar3 you would be on the 1st Tuesday of
April and Calendar4 would be on the 3rd Tuesday of April.






"Norman Jones" wrote in message
...
Hi Patrick,

It turns out that what I need to have happen, is that if I select the 2nd
Tuesday (say of September) on Calendar1 then Calendar2 should have the
4th Tuesday of September selected, Calendar3 the second Tuesday of
October and Calendar4 would display the 4th Tuesday of October. Of course
if I had started with the 4th Tuesday of September the I would need the
2nd Tuesday of October and so on.


Your code responded in precisely the above manner for me.

What dates were displayed in your dependent calendar controls?

---
Regards,
Norman



"Patrick Simonds" wrote in message
...
I have a dialog box which contains 4 Calendars. The 4 calendars are set up
so that when you click on the 2nd or 4th Tuesday of the first calendar the
other calendars would progressively show the next Tuesday which was 2
weeks away, see code below.

It turns out that what I need to have happen, is that if I select the 2nd
Tuesday (say of September) on Calendar1 then Calendar2 should have the
4th Tuesday of September selected, Calendar3 the second Tuesday of
October and Calendar4 would display the 4th Tuesday of October. Of course
if I had started with the 4th Tuesday of September the I would need the
2nd Tuesday of October and so on.

So it is obvious my code can not do this, so does anyone have an idea how
I might make this work?



Private Sub Calendar1_Click()

Calendar2 = Calendar1 + 14
Calendar3 = Calendar1 + 28
Calendar4 = Calendar1 + 42

End Sub