PDA

View Full Version : [SOLVED] Ensure selected cell is filled before proceed to VBA language



alexnkc
11-26-2013, 07:02 PM
Hi,


I will like to ensure that cell A1:A9 and C1 is filled before proceed to another VBA language.
Please help on the VBA language as it is not working.



If Sheets("Sheet1").Range("A1:A9").Value = "" Then
MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
Exit Sub
End If


If Sheets("Sheet1").Range("C1").Value = "" Then
MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
Exit Sub
End If



Thanks

patel
11-27-2013, 05:12 AM
Sub a()
For Each cell In Sheets(1).Range("A1:A9")
If cell = "" Then
MsgBox Title:="Warning", Prompt:="Please fill-up the Empty Cell in-order to proceed"
Exit Sub
End If
Next
End Sub

alexnkc
11-27-2013, 05:12 PM
Thanks patel
Code that provided is working. :-)