I created a form in VBE to input data in a spreadsheet
Public Sub EnterDataInWorksheet()
'Copy the data of the form to the sheet
Dim r As Range
Dim r1 As Range
Set r = Worksheets("Invoices Data").Range("a1").CurrentRegion
Set r1 = r.Offset(r.Rows.Count, 0)
r1.Cells(1).Value = txtInvoice.Value
r1.Cells(2).Value = txtPartNumber.Value
r1.Cells(3).Value = txtQty.Value
r1.Cells(4).Value = txtArrival.Value
End Sub
The date is entered in the format "dd/mm/yy", but when the information is transferred to the sheet it becomes text.
How do I keep as date?
Public Sub EnterDataInWorksheet()
'Copy the data of the form to the sheet
Dim r As Range
Dim r1 As Range
Set r = Worksheets("Invoices Data").Range("a1").CurrentRegion
Set r1 = r.Offset(r.Rows.Count, 0)
r1.Cells(1).Value = txtInvoice.Value
r1.Cells(2).Value = txtPartNumber.Value
r1.Cells(3).Value = txtQty.Value
r1.Cells(4).Value = txtArrival.Value
End Sub
The date is entered in the format "dd/mm/yy", but when the information is transferred to the sheet it becomes text.
How do I keep as date?