![]() |
MSG Box Repeating
In the following code:
Public Sub SheetCalculate() ' Constants and Variables: Dim iCalc_Work As Integer 'Code: ' Total 4 SVS months cells and put out a message if 12 iCalc_Work = Range("E20") + Range("E21") + Range ("E22") + Range("E23") If iCalc_Work 12 Then MsgBox "Total of SVS phase months must be between 1 and 12" End Sub The same MsgBox displays a total of 5 times. What is triggering the repeated ctin and how do I set it to 1 occurrence? Thansks |
MSG Box Repeating
What causes the macro to fire? SheetCalculate does not match any built in
Events. Anyway, something must be calling your sub 5 times. -- Regards, Tom Ogilvy "Dale Cox" wrote in message ... In the following code: Public Sub SheetCalculate() ' Constants and Variables: Dim iCalc_Work As Integer 'Code: ' Total 4 SVS months cells and put out a message if 12 iCalc_Work = Range("E20") + Range("E21") + Range ("E22") + Range("E23") If iCalc_Work 12 Then MsgBox "Total of SVS phase months must be between 1 and 12" End Sub The same MsgBox displays a total of 5 times. What is triggering the repeated ctin and how do I set it to 1 occurrence? Thansks |
MSG Box Repeating
I am calling it from the Workbook_SheetCalculate event.
-----Original Message----- What causes the macro to fire? SheetCalculate does not match any built in Events. Anyway, something must be calling your sub 5 times. -- Regards, Tom Ogilvy "Dale Cox" wrote in message ... In the following code: Public Sub SheetCalculate() ' Constants and Variables: Dim iCalc_Work As Integer 'Code: ' Total 4 SVS months cells and put out a message if 12 iCalc_Work = Range("E20") + Range("E21") + Range ("E22") + Range("E23") If iCalc_Work 12 Then MsgBox "Total of SVS phase months must be between 1 and 12" End Sub The same MsgBox displays a total of 5 times. What is triggering the repeated ctin and how do I set it to 1 occurrence? Thansks . |
All times are GMT +1. The time now is 10:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com