Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Calendar popup

I am using the calendar1 popup. Is there a way to make the dates prior to
Todays date unselectable?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Calendar popup

I don't think you can prevent the user from clicking an earlier date, but
you can intercept the Click event and set the Value to the current date:

Private Sub Calendar1_Click()
If Me.Calendar1.Value < Int(Now) Then
Me.Calendar1.Value = Int(Now)
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"jnf40" wrote in message
...
I am using the calendar1 popup. Is there a way to make the dates prior to
Todays date unselectable?



  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 145
Default Calendar popup

Hi jnf40,

you could do something like this (added to teh click event f the
calendar): -
=====

Private Sub Calendar1_Click()
If Calendar1.Value < Now() Then
MsgBox "can't select dates before today"
Calendar1.Value = Now()
End If
End Sub

=====
hth,

tim

"jnf40" wrote in message
...
I am using the calendar1 popup. Is there a way to make the dates prior to
Todays date unselectable?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup calendar GerryK Excel Discussion (Misc queries) 1 April 4th 07 07:14 PM
calendar popup Aaron Excel Discussion (Misc queries) 1 May 11th 06 02:52 PM
Using the popup calendar Erik Excel Programming 5 April 21st 06 04:26 PM
Popup calendar Paul Excel Programming 2 September 16th 05 07:27 PM
Popup calendar Ron de Bruin Excel Programming 0 July 2nd 04 04:36 PM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"