You could do something like this:
Private Sub CommandButton1_Click()
If txtNoMember.Value = "" Then
MsgBox "Please enter the Number of Member.", vbExclamation, "Input Data"
Exit Sub
Else
Dim v As Long, ctrl As Control
v = txtNoMember.Value
For i = 1 To v
For Each ctrl In Controls ' loop through Controls and search for Control with the right name
If ctrl.Name = "txtMember" & Format(i, "0#") Then
If ctrl.Value = "" Then
MsgBox "Member(s) cannot be empty.", vbExclamation, "Input Data"
Exit Sub
End If
Exit For
End If
Next
Next
End Sub
This works even if you enter 4 in txtNoMember, when you only have txtMemberNo03 as max.