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: 16
Default Calling Stack size in Userforms

Pardon my ignorance, but Should I be worried about this?...

While developing a project with my first Userforms I've noticed that the
Calling stack icon shows something like a normal event stack, but with added
"non-Visual Basic code" entries.

It seems the number of call stack entries is affected by at least two
factors:
by coding a debugging Stop statement
by the number of Me.Hide / Me.Show pairs executed
(If you comment out the Show/Hides you get no entries for CButton1)

Paste the code below into a Userform with 2 big Command buttons and run the
form, you'll see what I mean.

My Question is
Should I be worried about consuming potentially infinite Stack space?
Or is this not a view of a real stack, but just a debugging aid with a
defined trace of (potentially nested) Shows of n userforms?

For quickness I started Task Manager/Performance graphs and watched the
memory line, but it was a flat line. That wasn't a proper test because I
didn't minimised external events which affect memory usage

Can someone please re-assure me about this?
My project is nearly ready for use by naive users
I want it as bomb proof as poss


spilly


Option Explicit

Private Sub CommandButton1_Click()
Me.Hide
'''''Do your VB stuff here
Me.Show
End Sub

Private Sub CommandButton2_Click()
Stop 'PLEASE LOOK AT THE CALL STACK NOW
End Sub

Private Sub UserForm_Initialize()

CommandButton1.Caption = "Simulate Event code"
CommandButton2.Caption = "Watch Call stack in VBE"

End Sub

 
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
auto-size userforms [email protected] Excel Programming 4 February 20th 06 11:07 AM
stack columns Wan Excel Discussion (Misc queries) 1 December 26th 05 05:22 AM
When to use a stack? Andrew[_16_] Excel Programming 15 September 7th 04 03:06 PM
GetSystemMetrics32() [Screen Size and UserForms - pt 2] Jason Gatsby Excel Programming 0 August 4th 03 06:54 PM
Screen Size and UserForms Jason Gatsby Excel Programming 2 August 4th 03 01:48 PM


All times are GMT +1. The time now is 06:48 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"