A text box show current date(like 24-03-2009). I write in other textbox
3. I want when I write 3 then the textbox (24-03-2009) automatically increase month like 24-06-2009. how it possible?
abu taher 34 Practically a Posting Shark
Recommended Answers
Jump to Post' Use the Change Event of the text box Private Sub txtDateChange_Change() Dim strText, vNewDate As Variant, intEntered As Integer strText = txtDateChange If IsNumeric(strText) Then intEntered = CInt(strText) vNewDate = DateAdd("m", intEntered, CDate(txtDate1)) txtDate1 = Format(vNewDate, "Short Date") End if End Sub
Jump to Post' Use the Change Event of the text box ' In this example txtDateChange is the other text box. Private Sub txtDateChange_Change() Dim strText, vNewDate As Variant, intEntered As Integer strText = txtDateChange ' Test for correct input: this does not deal with negative values. If IsNumeric(strText) …
Jump to PostA text box show current date(like 24-03-2009). I write in other textbox
3. I want when I write 3 then the textbox (24-03-2009) automatically increase month like 24-06-2009. how it possible?Text1.Text = Format(DateAdd("m", Val(Text2.Text), Text1.Text), "dd-mm-yyyy")
All 10 Replies
hkdani 39 Posting Pro in Training
hkdani 39 Posting Pro in Training
abu taher 34 Practically a Posting Shark
hkdani 39 Posting Pro in Training
abu taher 34 Practically a Posting Shark
koolsid 1 Light Poster
tarabosh 0 Newbie Poster
vb5prgrmr 143 Posting Virtuoso
manikanta4111 0 Newbie Poster
abu taher 34 Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.