Thread: Message Box
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
srroduin srroduin is offline
external usenet poster
 
Posts: 34
Default Message Box

Works great! Thanks!

"Ardus Petus" wrote:

Column LR does not exist. I presume you want to check whole column J.

Use following test:
If Application.Countif(Worksheets("feuil1").columns(" J"),"<0") Then

Cheers,
--
AP

"srroduin" a écrit dans le message de
news: ...
I want a message box to display if any of the values in column J are
negative.

This is what I put, however, I get a run time error.

Dim LR As Long

LR = LastRow(Sheets("Outage"))

Dim ErrorMSG As String

If Worksheets("Outage").Range("J10: LR").Value = negative Then

ErrorMSG = MsgBox("Warning. There are negative MW values. Please
recalculate using smaller MW values.")

End If

Any suggestions?

Thanks