Hi,
I have macro wich counts how many cells with certain value is in column W and show it in msgbox but whenever macro is runned the message poping 5 times. How to make it show only once?
Private Sub Worksheet_Calculate()
Dim i As Long
i = Application.WorksheetFunction.CountIf(Range([W2], Cells(Rows.Count, "W").End(xlUp)), "tak")
If i > 0 Then MsgBox "Sa " & i & " wózki do przeglądu"
End Sub
I have macro wich counts how many cells with certain value is in column W and show it in msgbox but whenever macro is runned the message poping 5 times. How to make it show only once?
Private Sub Worksheet_Calculate()
Dim i As Long
i = Application.WorksheetFunction.CountIf(Range([W2], Cells(Rows.Count, "W").End(xlUp)), "tak")
If i > 0 Then MsgBox "Sa " & i & " wózki do przeglądu"
End Sub