Solved

Date Picker Control - Locking/Unlocking

Posted on 2000-03-28
6
412 Views
Last Modified: 2013-12-25
How do you lock/unlock the Date Picker Control?  There is no LOCKED property for the Date Picker Control.

Sheila
0
Comment
Question by:baileys
  • 3
  • 2
6 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2665606
To lock the date use the following

DTPicker1.MaxDate = Now
DTPicker1.MinDate = Now

or instead of Now the date you want it locked to.

To unlock

DTPicker1.MaxDate = "12/31/9999"
DTPicker1.MinDate = "01/01/1601"
0
 

Author Comment

by:baileys
ID: 2665719
That works to lock the control, but I also want to disable the dropdown calendar.

Sheila
0
 
LVL 20

Accepted Solution

by:
hes earned 100 total points
ID: 2665735
dtpicker1.UpDown =True
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 2

Expert Comment

by:damienm
ID: 2668998
Why don't you set the datepickers enabled property to false.

dtPicker.enabled = false
0
 

Author Comment

by:baileys
ID: 2671518
If I set the enabled to false, the dates are shaded.
0
 

Author Comment

by:baileys
ID: 2671522
Thanks, that worked.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question