TextBox Value (based on calc)

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
I have two textboxes on a form. One has a Date the other has a number. In a third textbox (textbox20) I want a date based on what's in Textbox17 plus the number that's in textbox18
Note that the user can change the value in textbox18

Textbox20 should show as a date

Example: Now() + 14

Code:
Private Sub UserForm_Initialize()
'Message
TextBox7 = Sheet14.Range("D2").Value
TextBox17 = Format(Now(), "dd-mmm-yyyy")
TextBox18.Text = "14"
TextBox19.Text = "180"
End Sub

THANK YOU!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Got it

TextBox20 = Format(Now() + TextBox18, "dddd, dd-mmm-yyyy")
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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