ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Calendar to ONLY allow for Tuesday's in any month to be selected (https://www.excelbanter.com/excel-programming/414520-excel-calendar-only-allow-tuesdays-any-month-selected.html)

Corey ....[_2_]

Excel Calendar to ONLY allow for Tuesday's in any month to be selected
 
Is there a way to ONLY enable a Tuesday to be selected from a Calendar, with
no other days of the week enabled ?

If so how can i do this?

Corey....



Rick Rothstein \(MVP - VB\)[_2377_]

Excel Calendar to ONLY allow for Tuesday's in any month to be selected
 
I think this BeforeUpdate event code for the Calendar will do what you
want...

Private Sub Calendar1_BeforeUpdate(Cancel As Integer)
Calendar1.Value = Calendar1.Value - Weekday(Calendar1.Value) + 3
End Sub

Rick


"Corey ...." wrote in message
...
Is there a way to ONLY enable a Tuesday to be selected from a Calendar,
with no other days of the week enabled ?

If so how can i do this?

Corey....



Joerg Mochikun

Excel Calendar to ONLY allow for Tuesday's in any month to be selected
 
Unlock Tuesday (Format-Cells-Protection-uncheck 'Locked') and protect your
sheet.

JM


"Corey ...." wrote in message
...
Is there a way to ONLY enable a Tuesday to be selected from a Calendar,
with no other days of the week enabled ?

If so how can i do this?

Corey....





All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com