Hi
Hoping someone can help, I have the below code that pulls data from specific cells in active sheet to a userform. Even though the cells are formatted as date (dd/mm/yy) the userform shows it as mm/dd/yy.
Private Sub TextBox3_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'Dim dDate As Date
dDate = DateSerial(Year(Date), Month(Date), Day(Date))
TextBox3.Value = Format(TextBox3.Value, "dd/mm/yy")
dDate = TextBox3.Value
End Sub
Private Sub TextBox4_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'Dim dDate As Date
dDate = DateSerial(Year(Date), Month(Date), Day(Date))
TextBox4.Value = Format(TextBox4.Value, "dd/mm/yy")
dDate = TextBox4.Value
End Sub
Private Sub Userform_Activate()
With Me
.TextBox1.Value = Range("B7").Value
.TextBox2.Value = Range("L7").Value
.TextBox3.Value = Range("C7").Value
.TextBox4.Value = Range("D7").Value
.TextBox5.Value = Range("E7").Value
.TextBox6.Value = Range("G7").Value
.TextBox7.Value = Range("F7").Value
.TextBox8.Value = Range("H7").Value
End With
End Sub
I have been searching since yesterday and had no luck with this.
Thanks in advance
Bookmarks