Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
auto-size userforms | Excel Programming | |||
stack columns | Excel Discussion (Misc queries) | |||
When to use a stack? | Excel Programming | |||
GetSystemMetrics32() [Screen Size and UserForms - pt 2] | Excel Programming | |||
Screen Size and UserForms | Excel Programming |