You could try this. Don't forget to change the relevant bits
Private Sub CommandButton1_Click()
If TextBox1.Text <> "" Then
DoYourPrintThing
Else
msg = MsgBox("You need something in the textbox", vbCritical + vbOKOnly, "Warning")
End If
End Sub