al4629740
asked on
Run code for all LostFocus events under an array
I have the following code for a LostFocus event on my vb6 form. As you can see it is on a textbox control named MR6Date(0)
I have an array of MR6Date(0) to MR6Date(19)
Is it possible to have this code run for all LostFocus events for this array?
I have an array of MR6Date(0) to MR6Date(19)
Is it possible to have this code run for all LostFocus events for this array?
Private Sub MR6Date_LostFocus(Index As Integer)
If Not MR6Date(0) = "" Then
If IsDate(MR6Date(0)) = False Then
MsgBox "Enter a Valid Date in the Correct Format", vbOKOnly, "Date"
MR6CCM(0).Enabled = False
MR6CSW(0).Enabled = False
Exit Sub
End If
Text15 = Format(MR6Date(0), "mm/dd/yyyy")
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.