For Each cell In Worksheets("Barcode").Range("A1:A5")
If cell.Value = "Enter" Then
(do this)
Else
(do that)
End If
Next cell
--
HTH
RP
(remove nothere from the email address if mailing direct)
<triple_c77@yahoo.com> wrote in message
news:1135247433.063632.42760@g14g2000cwa.googlegroups.com...
> Hello...
>
> I am trying to use VBA (vbscript?) to perform an action if the word
> "Enter" does not appear within a range of 5 cells (A1:A5). I have
> saved the file with the word "Enter" typed in the cell, and I want the
> user to be forced to change the value of all 5 cells before the action
> is performed.
>
> I have been able to make this work using only ONE cell in the range
> (A1):
>
> If Worksheets("Barcode").Range("A1") = "Enter" Then
> (do this)
> Else
> (do that)
>
> How can I expand this statement to be true for all 5 cells?
>
> Any help would be greatly appreciated!!
> Cannon
>
Bookmarks