I m writing a program and it is not working. I will write a simple version of it
Dim rng as range
Dim message as integer
Set rng = Range(cells(1,1), cells (4,1))
If isempty(rng) then
mess = msgbox ("hello", vbyesno, "hello")
If mess = 6 then
Msgbox "hello"
Else
Msgbox "bye"
End if
Else
Msgbox "haha"
End if
This is the program, But when the cell is empty or if there is a value in the cell then it executes the else statement, that is "haha" and howsoever doesn't execute the first statement although it may be true. Why is it happening and what am i possibly doing wrong while writing the program.