Hey people
I have som questions regarding a userform i have made - Basiaclly I have to type in some customer data which i have made but now i want to tweak it a bit - can anybody help?
1) When day add a day to Text_Lastday,Text_1day, Text_Transferdate sometimes they write 18-12-2020 or 18.12.2020 But i want the format always to be 2020-12-18 is that possible?
2) In Text_DOT there can only be 10 digits how do i do that?
3) Before they are able to add a customer they have to fill all fields out % Text_1day how can i do dat?
Thank you
I have som questions regarding a userform i have made - Basiaclly I have to type in some customer data which i have made but now i want to tweak it a bit - can anybody help?
1) When day add a day to Text_Lastday,Text_1day, Text_Transferdate sometimes they write 18-12-2020 or 18.12.2020 But i want the format always to be 2020-12-18 is that possible?
2) In Text_DOT there can only be 10 digits how do i do that?
3) Before they are able to add a customer they have to fill all fields out % Text_1day how can i do dat?
Thank you
VBA Code:
Option Explicit
Private Sub CommandButton1_Click() '' add customer
Dim TargetRow As Long
Dim DOTName As String
If Sheets("Liste").Range("F2").Value = "NEW" Then
TargetRow = Sheets("Liste").Range("F1").Value + 1
Else
TargetRow = Sheets("Liste").Range("F3").Value
''Begin validation check
End If
DOTName = Text_DOT
'''Begin Input Data Into Database
Sheets("sager").Range("Data_Start").Offset(TargetRow, 5).Value = TargetRow
Sheets("sager").Range("Data_Start").Offset(TargetRow, 6).Value = Text_1day
Sheets("sager").Range("Data_Start").Offset(TargetRow, 7).Value = Text_Lastday
Sheets("sager").Range("Data_Start").Offset(TargetRow, 8).Value = Tekst_Reason
Sheets("sager").Range("Data_Start").Offset(TargetRow, 9).Value = Text_Transferdate
Sheets("sager").Range("Data_Start").Offset(TargetRow, 10).Value = Text_Inst
Sheets("sager").Range("Data_Start").Offset(TargetRow, 11).Value = Text_DOT
Sheets("sager").Range("Data_Start").Offset(TargetRow, 12).Value = Text_Number
Sheets("sager").Range("Data_Start").Offset(TargetRow, 13).Value = Text_Department
Sheets("sager").Range("Data_Start").Offset(TargetRow, 14).Value = Text_Type
MsgBox "Person With DOT ;" & DOTName & "are added"
Unload AddManual
End Sub