![]() |
Is it possible to ensure Calendar date is in range
I have a dynamic range set to a column with varying dates over a varying
number of rows. I am asking the user to select a date with a related form. I need the user to select a date from the calendar control which appears in th dynamic range. Not within the Min / Max of the range but an exact match. My Calendar control is named Calendar1 how can I make sure the user picks a date in the range? Thank you for any help. Rob |
Is it possible to ensure Calendar date is in range
Hi Rob,
Something like this Private Sub Calendar1_Click() Dim mtch mtch = Application.Match(CLng(Calendar1.Value), Worksheets("Sheet1").Range("A1:A1000"), 0) If IsError(mtch) Then MsgBox ("Invalid date") End If End Sub -- HTH Bob Phillips "Robert Hargreaves" wrote in message ... I have a dynamic range set to a column with varying dates over a varying number of rows. I am asking the user to select a date with a related form. I need the user to select a date from the calendar control which appears in th dynamic range. Not within the Min / Max of the range but an exact match. My Calendar control is named Calendar1 how can I make sure the user picks a date in the range? Thank you for any help. Rob |
All times are GMT +1. The time now is 06:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com