i have a userform that I made recently and it works fine, but now I wish it to check the text boxes if they're blank or if the ones for numerical entry have letters in them. This code I hoped to work but I keep getting this error (image)
The "controls_check_blank" and "controls_check_numbers" are dynamic from lists on sheets("controls") that I type the name of the textbox into.
Next thing I'm working on is how to set the different numerical format for each textbox.
The "controls_check_blank" and "controls_check_numbers" are dynamic from lists on sheets("controls") that I type the name of the textbox into.
Next thing I'm working on is how to set the different numerical format for each textbox.
VBA Code:
Option Explicit
Sub Check_Blanks()
Dim Ken_Cell As Range
For Each Ken_Cell In Sheets("controls").Range("controls_check_blanks")
If Card_Name_UF.Controls(Ken_Cell.Value) = "" Then
MsgBox "Make sure all textboxes have entries"
Exit Sub
End If
Next Ken_Cell
For Each Ken_Cell In Sheets("Controls").Range("Controls_check_number")
If IsNumeric(Card_Name_UF.Controls(Ken_Cell.Value)) = False Then
MsgBox "Make sure all Numeric boxes have only numbers in them"
Exit Sub
End If
Next Ken_Cell
Call Transfer_Data
End Sub