Hi All
Im using the below code to prevent a macro from running if all fields in a tabel are not filled in. I just cant seam to make it check a range of cells. the ranges i want checking are:
D8:D12
D14:G24
D26:D30
D32:D34
Can anyone Please help! Thanks in advance
Im using the below code to prevent a macro from running if all fields in a tabel are not filled in. I just cant seam to make it check a range of cells. the ranges i want checking are:
D8:D12
D14:G24
D26:D30
D32:D34
Can anyone Please help! Thanks in advance
Code:
Sub Check ()
If Range("G3") = Empty Then MsgBox "Please fill in all fields!"
Else
MsgBox "OK"
'Macro to run here
End If
End Sub