Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeating Rows Michael Gudyka Excel Discussion (Misc queries) 1 October 1st 07 08:13 PM
Repeating Number Sly Excel Worksheet Functions 1 July 28th 07 10:44 PM
Repeating a column mdworske Excel Discussion (Misc queries) 3 January 7th 07 11:59 PM
Repeating Above Value Roger J Michaud Excel Worksheet Functions 3 December 13th 06 02:37 PM
Repeating Lynn Excel Worksheet Functions 2 January 7th 05 04:25 PM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"