ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DT Picker (https://www.excelbanter.com/excel-programming/391692-dt-picker.html)

[email protected]

DT Picker
 
Hello all,

I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?


RB Smissaert

DT Picker
 
Not sure how your datepicker is done, but I would go with the Monthview
control that comes with Microsoft Windows Common Controls-2 6.0
It will save you all the validating and it is easy for the user as well.

RBS

wrote in message
oups.com...
Hello all,

I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?



Mike

DT Picker
 
What is a blnvalid code ?

" wrote:

Hello all,

I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?



[email protected]

DT Picker
 
On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?



" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code


Mike

DT Picker
 
Post your code Boolean Validation code should not be a problem

" wrote:

On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?



" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code



[email protected]

DT Picker
 
On 22 Jun, 13:26, Mike wrote:
Post your code Boolean Validation code should not be a problem



" wrote:
On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?


" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code- Hide quoted text -


- Show quoted text -


Private Sub Ok_Click()
Dim BlnValid As Boolean
BlnValid = True
If PortfolioName.Value = "" Or _
ContractualParty.ListIndex < 0 Or _
TypeOfCredit.ListIndex < 0 Or _
Vendor.ListIndex < 0 Or _
ClientCode.ListIndex < 0 Or _
DTPicker1.Enabled = False Or _
Category.ListIndex < 0 Or _
TypeOfContract.ListIndex < 0 Or _
UID.Value = "" Or _
Debts.Value = "" Or _
FaceValue.Value = "" Or _
AcquisitionCost.Value = "" Or _
Owner.ListIndex < 0 Or _
CurrencyBox.ListIndex < 0 Or _
FirstYearCash.Value = "" Or _
Year2Decay.Value = "" Or _
Year3Decay.Value = "" Or _
Year4Decay.Value = "" Or _
Year5Decay.Value = "" Or _
Year6Decay.Value = "" Or _
Year7Decay.Value = "" Or _
Year8Decay.Value = "" Or _
Year9Decay.Value = "" Or _
Year10Decay.Value = "" Then
BlnValid = False
MsgBox ("You must complete all sections with white boxes."),
vbCritical, "Error"
End If
If BlnValid Then Update
End Sub


[email protected]

DT Picker
 
On 22 Jun, 13:26, Mike wrote:
Post your code Boolean Validation code should not be a problem



" wrote:
On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?


" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code- Hide quoted text -


- Show quoted text -


Private Sub Ok_Click()
Dim BlnValid As Boolean
BlnValid = True
If PortfolioName.Value = "" Or _
ContractualParty.ListIndex < 0 Or _
TypeOfCredit.ListIndex < 0 Or _
Vendor.ListIndex < 0 Or _
ClientCode.ListIndex < 0 Or _
DTPicker1.Enabled = False Or _
Category.ListIndex < 0 Or _
TypeOfContract.ListIndex < 0 Or _
UID.Value = "" Or _
Debts.Value = "" Or _
FaceValue.Value = "" Or _
AcquisitionCost.Value = "" Or _
Owner.ListIndex < 0 Or _
CurrencyBox.ListIndex < 0 Or _
FirstYearCash.Value = "" Or _
Year2Decay.Value = "" Or _
Year3Decay.Value = "" Or _
Year4Decay.Value = "" Or _
Year5Decay.Value = "" Or _
Year6Decay.Value = "" Or _
Year7Decay.Value = "" Or _
Year8Decay.Value = "" Or _
Year9Decay.Value = "" Or _
Year10Decay.Value = "" Then
BlnValid = False
MsgBox ("You must complete all sections with white boxes."),
vbCritical, "Error"
End If
If BlnValid Then Update
End Sub


Mike

DT Picker
 
DTPicker1.Enabled = True

" wrote:

On 22 Jun, 13:26, Mike wrote:
Post your code Boolean Validation code should not be a problem



" wrote:
On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?


" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code- Hide quoted text -


- Show quoted text -


Private Sub Ok_Click()
Dim BlnValid As Boolean
BlnValid = True
If PortfolioName.Value = "" Or _
ContractualParty.ListIndex < 0 Or _
TypeOfCredit.ListIndex < 0 Or _
Vendor.ListIndex < 0 Or _
ClientCode.ListIndex < 0 Or _
DTPicker1.Enabled = False Or _
Category.ListIndex < 0 Or _
TypeOfContract.ListIndex < 0 Or _
UID.Value = "" Or _
Debts.Value = "" Or _
FaceValue.Value = "" Or _
AcquisitionCost.Value = "" Or _
Owner.ListIndex < 0 Or _
CurrencyBox.ListIndex < 0 Or _
FirstYearCash.Value = "" Or _
Year2Decay.Value = "" Or _
Year3Decay.Value = "" Or _
Year4Decay.Value = "" Or _
Year5Decay.Value = "" Or _
Year6Decay.Value = "" Or _
Year7Decay.Value = "" Or _
Year8Decay.Value = "" Or _
Year9Decay.Value = "" Or _
Year10Decay.Value = "" Then
BlnValid = False
MsgBox ("You must complete all sections with white boxes."),
vbCritical, "Error"
End If
If BlnValid Then Update
End Sub



[email protected]

DT Picker
 
On 25 Jun, 11:58, Mike wrote:
DTPicker1.Enabled = True



" wrote:
On 22 Jun, 13:26, Mike wrote:
Post your code Boolean Validation code should not be a problem


" wrote:
On 20 Jun, 22:54, Mike wrote:
What is a blnvalid code ?


" wrote:
Hello all,


I have created a userform with a DT picker. The problem I am having is
that I am trying to make the user enter a date using the date picker
by using a blnvalid code. It seems to work fine with everything else
but not with the DT picker. Any ideas?- Hide quoted text -


- Show quoted text -


It is a Boolean Validation code- Hide quoted text -


- Show quoted text -


Private Sub Ok_Click()
Dim BlnValid As Boolean
BlnValid = True
If PortfolioName.Value = "" Or _
ContractualParty.ListIndex < 0 Or _
TypeOfCredit.ListIndex < 0 Or _
Vendor.ListIndex < 0 Or _
ClientCode.ListIndex < 0 Or _
DTPicker1.Enabled = False Or _
Category.ListIndex < 0 Or _
TypeOfContract.ListIndex < 0 Or _
UID.Value = "" Or _
Debts.Value = "" Or _
FaceValue.Value = "" Or _
AcquisitionCost.Value = "" Or _
Owner.ListIndex < 0 Or _
CurrencyBox.ListIndex < 0 Or _
FirstYearCash.Value = "" Or _
Year2Decay.Value = "" Or _
Year3Decay.Value = "" Or _
Year4Decay.Value = "" Or _
Year5Decay.Value = "" Or _
Year6Decay.Value = "" Or _
Year7Decay.Value = "" Or _
Year8Decay.Value = "" Or _
Year9Decay.Value = "" Or _
Year10Decay.Value = "" Then
BlnValid = False
MsgBox ("You must complete all sections with white boxes."),
vbCritical, "Error"
End If
If BlnValid Then Update
End Sub- Hide quoted text -


- Show quoted text -


All that does is check whether the DTPicker is enabled. What I want it
to do is force the user to pick a date. There is the possibility of
using a check box on the DTPicker if anyone knows how to setup a
Blnvalid based on that?



All times are GMT +1. The time now is 11:27 AM.

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