sprlvlyldy
New Member
Hi,
this site has definately been my go to site. I am so new to VBA. I have been trying to figure this out for the past couple hours and decided to give in and ask the great minds on here.
I have a command button on the bottom of my excel sheet for printing. I do not want the user to be able to print if there are certain blank cells. This is the code I have kind of pieced together, which I know is completely wrong.
Private Sub Workbook()
If IsEmpty(B2, B3, B4) Then
CommandButton1.Disabled
MsgBox "A value is required before printing form."
Else
MsgBox ("Form is complete. Please route for signature.")
End If
End Sub
Can someone please help me figure out my errors? Do I need to include the sheet name in here somewhere (which is just Sheet1)?
Thank you in advance!
Sprlvlyldy
this site has definately been my go to site. I am so new to VBA. I have been trying to figure this out for the past couple hours and decided to give in and ask the great minds on here.
I have a command button on the bottom of my excel sheet for printing. I do not want the user to be able to print if there are certain blank cells. This is the code I have kind of pieced together, which I know is completely wrong.
Private Sub Workbook()
If IsEmpty(B2, B3, B4) Then
CommandButton1.Disabled
MsgBox "A value is required before printing form."
Else
MsgBox ("Form is complete. Please route for signature.")
End If
End Sub
Can someone please help me figure out my errors? Do I need to include the sheet name in here somewhere (which is just Sheet1)?
Thank you in advance!
Sprlvlyldy