I have multiple textboxes (textbox 61:textbox 124) and (textbox 62:textbox 125) . what I want when fill any textbox from 62:125 should populate date (today ) from 61:124 based on adjacent textbox for each textbox is filled from 62:125
I try doing two loops but doesn't success so far
thanks in advance .
I try doing two loops but doesn't success so far
VBA Code:
Sub pop_date()
Dim i, S As Long
For i = 62 To 125 Step 7
'first set of TextBoxes
If Me.Controls("TextBox" & i) <> "" Then
For i = 61 To 124 Step 7
With Me.Controls("TextBox" & S)
.Value = Format(.Value, "DD/mm/YYYY")
End With
Next i
Next S
End Sub