LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Out of Stack Space error

Hi,

I have a program which has a User form. and which uses multiple IF statements
to determine what to do. The user enters FirstDate, SecondDate and number of
transactions to look at (NoToFill). It uses a counter to check the cell value
on one sheet and, depending on what that cell value is, does a variety of
things. Hence, the multiple IF statements. As of now I have been unable to
execute any IF statement beyond the first two. Here is a brief bit of code:
The format for the cells is General.

'Main program
Public Sub Jim()
Count = 1

For i = 1 To NoToFill
Count = Count + 1
'If first transaction then set up first line on Sheet3
If Count = 2 Then Mary1
'If other than first transactions and date on sheet2 before date entered by
user go to Fred
If Worksheets("Sheet2").Cells(Count, 2) < FirstDate Then Fred
'If other than first transactions and date on sheet2 within dates entered by
user go to Jane
If Worksheets("Sheet2").Cells(Count, 2) = FirstDate And
Worksheets("Sheet2").Cells(Count, 2) <= SecondDate Then Jane

Next i

End Sub

I can get results from "Mary1" and "Fred" but "Jane" never seems to process
anything. The error I receive is an Out of Stack Space error. Mary1 and Fred
do process if I do not enter dates. However, when I enter dates and the
program is supposed to calculate based upon the date criteria, I get an Out of
Stack error and an arrow appears next to the If Count=2 Then Mary1 line. Can
anyone tell me what might be wrong and what I should do to correct it?

Thanks
 
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
Out of Stack Space error TheMilkGuy Excel Discussion (Misc queries) 2 July 22nd 09 05:54 PM
Out of Stack space - run time error 28 Rob Excel Discussion (Misc queries) 2 December 17th 07 04:55 PM
"Out of Stack Space" Macro Error Adam Excel Discussion (Misc queries) 3 July 2nd 07 07:10 PM
Run time error 28: Out of stack space Will Wirtz Excel Programming 1 April 27th 04 01:39 PM
Run Time Error "28" - Out of stack space? Tom Ogilvy Excel Programming 0 September 12th 03 04:43 PM


All times are GMT +1. The time now is 04:47 AM.

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

About Us

"It's about Microsoft Excel"