This example leaves CommandButton1 disabled until the user enters a value in TextBox1.
Private Sub TextBox1_LostFocus()
If TextBox1.Value = "" Then
CommandButton1.Enabled = False
Else
CommandButton1.Enabled = True
End If
End Sub