View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bonnie[_6_] Bonnie[_6_] is offline
external usenet poster
 
Posts: 2
Default Macro continues to run


"Robert Crandal" wrote in message
...
I ran this code and I didn't see any hourglass at all. I'm not sure
why the hour glass is appearing in your case.

BTW, is it okay in VBA to use the less than operator like
that ('If Range("g6") < Range("h6") < Range("k6") Then')??
I thought you had to use the AND operator between those,
such ast he following:

If (Range("g6") < Range ("h6")) AND (Range("h6") < Range("k6")) then
' Do stuff here
End If

Also, you you trying to compare a range or are you trying to compare
the values inside those cell ranges??? If you are comparing cell
contents,
shouldn't you use: Range("g6").value ' etc, etc... ????


Robert,

Although, it is good practice to specify *exactly* what is being compared, I
believe .Value is the default property of a range object. To compare
something other than the range value, that property (eg:
Range("G6").Address) would have to be explicitly coded.

I hope others will weigh in if I am incorrect.

Bonnie