stormhunter2000
asked on
Excel Macro
Hello, I need some help. I need to create a macro that will run when the project opens up and stays in the background. I need this macro, to popup a message box stating "Perform a RVR" whenever the user enters a value of 1600 or less on the activerow, in column m26. Another catch is the user might enter 1600 in another active row say m28. So basically i need it to cover m26,m28,m30 and so on.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANK YOU IT WORKED!!!
Excel-lent code ture.
:o) I'm glad that you like it. Thanks for the points, stormhunter!
/Ture
/Ture
Enter this into a new module:
Private Sub Workbook_SheetChange(ByVal
Dim i As Integer
i = 1
For Each c In Worksheets("Sheet1").Range
'To only do the even ones.
If i = 1 Then
i = i + 1
Else
If c.Value > 0 And c.Value < 1601 Then
MsgBox "Hello - " & c.Value & ", " & c.Cells.Address
End If
i = 1
End If
Next c
End Sub
Now - based on your question, I was given the impression that you only wanted the even ones in Column M ("So basically i need it to cover m26,m28,m30 and so on.").
If this is not the case, simply remove all references to i and the if statement related to i.
hth.
let me know if you have any questions or if I misunderstood the question.
Wileecoy.