Hi,

I need help with the text box changing to the date format.

I have 8 text boxes in sheet1, which link to the cell of B6 to B13 on Sheet 2, and I named the text boxes from "TextBoxSD1" to "TextBoxSD8", how can I mass change the text in the text boxes in date format? Do I need to specify the text boxes on sheet 1?


e.g. Date input on Sheet 2: 02/11/23
Date showing on Textbox on Sheet1: 45232


Here is the code I tried to write:

Sub Date_Format()
Dim i As Long
For i = 6 To 13
    Sheet2.Cells(i, 2) = Format(Me.Controls("TextBoxSD" & i - 5, "dd/mm/yy")
Next i
End Sub