-1
I have a macro for the Date that the user entered in Textbox, for minor that the date of a cell of a given row, I will make a change in the information of a column of this row.
Sub test()
Dim data As String
Dim ultima As Long
Dim split As Range
data = TextBox4.Value
data_i = Format(data, "dd/mm/yy")
ultima = Range("B" & Rows.Count).End(xlUp).Row
Set split = Range("B7:B" & ultima)
For Each cell In split
If cell < data_i Then
cell.Offset(0, 4) = "Data Menor"
End If
Next cell
End Sub
I know the VBA reads in American format. You would have to turn the dates of column B into "mm/dd/yy" to make the comparison with what the usurer wrote in Textbox?
What would be the best way to resolve this, please?
Thanks in advance! Hugs!