Date calculation in userform

sridharmasi79

New Member
Joined
Aug 19, 2017
Messages
4
Hi to all, in the userform I'm having many textbox, in that I'm having the following textbox. Date txtbox, Days txtbox, Dues txt box, End date txtbox, like that so on. If I enter the date in date txtbox and in day txtbox as 7 and in dues txtbox as 10 means, I want the value in the end date textbox by automatically calculated in the userform and not in the worksheet and end date txtbox should show me the end date. For example Date 18.08.2017 , it should add the day txtbox value 7days to the date and it should ends on the 10 th week which we give in dues txtbox. And the end date is 27.10.2017

The end date should depends on Date , Days, And Dues txtbox value
Please help me to find this in userform
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I am not 100% clear on where the Date + Days date should go.
The code below will add the # of days entered in the Dues box to the date in the Date box and put that calculated date in the End box.
You will need to adjust the code to the actual TextBox names you are using in your UserForm.
Code:
Me.txtbxEnd = DateAdd("d", Me.txtbxDues, Me.txtbxDate)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top