View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Macro continues to run

Hi Robert,
Thanks for your help. I am a brand newbie at this VBA programming. So in
answer
to your questions. I really would not know.

Regards,
Rob.


"Robert Crandal" wrote:

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



"Rob" wrote in message
...
Hi,
The following code works well with the exception that when the Message Box
appears and the cursor is moved off the Message Box on to the worksheet
the
hour glass appears instead of the mouse pointer. I presume this means that
the macro is still running.

Sub CheckVolumeRise1()
If Range("g6") < Range("h6") < Range("k6") Then
MsgBox Range("a6") & " has reached criteria"
End If
End Sub

Please will someone advise me on what to do.

Thank you.


.