ndendrinos
Well-known Member
- Joined
- Jan 17, 2003
- Messages
- 1,694
With this code I get a compile error
"function call on left hand side of assignment must return variant or object"
MsgBox= is highlighted
What I'm trying to do is this:
for each cell in [A17:A35] if the adjacent cell (same row column B) is empty then show a msggbox
Thank you
"function call on left hand side of assignment must return variant or object"
MsgBox= is highlighted
Code:
If [A16].Value = "B/Order" Then
Application.DisplayAlerts = False
Dim rng1 As Range
Dim rng2 As Range
Set rng1 = ActiveSheet.Range("A17:A35")
For Each rng2 In rng1
If rng2 = "" Then
MsgBox = "hello"
Next
Else
ActiveSheet.Delete
End If
Application.DisplayAlerts = True
What I'm trying to do is this:
for each cell in [A17:A35] if the adjacent cell (same row column B) is empty then show a msggbox
Thank you