View Single Post
 
Old 03-18-2019, 06:51 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You haven't provided any code so you will need to adapt this to your purposes
Code:
Private Sub btnOK_Click()
  Dim i As Integer, aCtl As Control
  For i = 1 To 8
    With Me.Controls("TextBox" & i)
      If .Value = "" Then
        MsgBox "Nothing in this one"
        .SetFocus
        Exit Sub
      Else
        MsgBox .Name & vbCr & .Value
      End If
    End With
  Next i
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote