- Home
·
- Miscellaneous
·
- This code allows you to put the begin and end dates in two separate textboxes as you drag your mous
This code allows you to put the begin and end dates in two separate textboxes as you drag your mous
This code allows you to put the begin and end dates in two separate textboxes as you drag your mouse over MonthView1 Control. Good for date
Rate This code allows you to put the begin and end dates in two separate textboxes as you drag your mous
(1(1 Vote))
'This code needs a Form with 1 MonthView and 2 textboxes controls called "txtDataInicio1Per" and "txtDataFim1Per" and a Module for variable declaration if you want it to be used in your entire application
'just paste it into your Form and be sure to have the controls i mencioned
dim N
On Error Resume Next
'You can change the names of the Variables "PrimeiraData" and "SegundaData" to your own; they are declared Public (as Date) at Module level or in the declaration part of your Form depending on what use you want to give them
Primeiradata = MonthView1.SelStart 'This Variable returns the date where the mouse first clicks
SegundaData = MonthView1.SelEnd 'This Variable returns the last date (where the mouse is released)
For N = PrimeiraData To SegundaData
If Weekday(DateValue(N)) = vbSunday Or Weekday(DateValue(N)) = Saturday
then
exit sub
Else
txtDataInicio1Per = MonthView1.SelStart
txtDataFim1Per.Text = N
End If
Next N
End Sub
This code allows you to put the begin and end dates in two separate textboxes as you drag your mous Comments
No comments yet — be the first to post one!
Post a Comment