abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,448
- Office Version
- 2019
- 2010
- Platform
- Windows
hi
i have problem add years and months days is ok i have textbox1= days textbox2= months textbox3= years when i choose in datepicker1= date then add months an years to datepicker2
this is my simple code
i have problem add years and months days is ok i have textbox1= days textbox2= months textbox3= years when i choose in datepicker1= date then add months an years to datepicker2
this is my simple code
VBA Code:
Private Sub CommandButton2_Click()
datepicker2 = DateAdd("d", textbox1.Text, datepicker1)
datepicker2 = DateAdd("M", textbox2.Text, datepicker1)
datepicker2 = DateAdd("YYYY", textbox3.Text, datepicker1)
End Sub