Blanchetdb
Board Regular
- Joined
- Jul 31, 2018
- Messages
- 164
- Office Version
- 365
- Platform
- Windows
Hi
I presently have the following:
there is more to the code but I inserted the pertinent information
the user enters a date in a cell using the following format "yyyy-mm-dd" but when activating the UserForm, the info appears (in the TextBox) in this format "mm/dd/yyyy"
how do I get the Date to appear in the UserForm TextBox in the following format yyyy-mm-dd
thank you
I presently have the following:
VBA Code:
Private Sub CommandButton1_Click()
Dim TargetRow As Integer
Dim FullName As String 'full name
Dim xRg As Range
Dim xCell As Range
Dim i As Long
Dim J As Long
Dim k As Long
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 28).Value = TextBox24
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 29).Value = TextBox2
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 30).Value = TextBox25
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 31).Value = TextBox21
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 32).Value = TextBox26
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 33).Value = TextBox9
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 34).Value = TextBox27
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 35).Value = TextBox22
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 36).Value = TextBox4
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 37).Value = TextBox3
Sheets("Staffing-Processes").Range("Ref").Offset(TargetRow, 38).Value = TextBox23
the user enters a date in a cell using the following format "yyyy-mm-dd" but when activating the UserForm, the info appears (in the TextBox) in this format "mm/dd/yyyy"
how do I get the Date to appear in the UserForm TextBox in the following format yyyy-mm-dd
thank you