+ Reply to Thread
Results 1 to 3 of 3

Print stack out as procedures execute?

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    579

    Print stack out as procedures execute?

    Is there a way to have a running printout of the stack, and possibly the points where one procedure hands off or calls another? A project I have been working on for well over a year now has become hard to manage. When I run some procedures I note that some called subs, whether directly called, called from other called subs, called from change events or anyway else get repeatedly called, some unnecessarily a number of times before the code executed finally returns control back to the user (me). This primarily happens when calculating or recalculating values that fill in the forms I display to keep track of the work I do. I am looking for ways to analyze the execution from when I trigger code to start running untill when it stops and returns control to the user, but the code has become awfully involved.

    I am hopeful that there might be means to do this directly within the VBE, for as can be seen with my previous posts, I am quite capable of missing the painfully obvious. If not available through the VBE, are there outside programs that anyone can recommend having used any?

    I think I have shown myself the true meaning of "spaghetti code", as much as I have tried to develop good practices, and wish to start digging my way out.

    Thank-you for your consideration and lending your knowledge!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Print stack out as procedures execute?

    Hi,

    You can only view the call stack from within the VBE in debug mode- it isn't part of the object model. Aivosto has some good programs for analyzing and documenting code- Visustin and Project Analyzer for example. They have good demo versions that you can try.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    579

    Re: Print stack out as procedures execute?

    Thank-you!

    I'm looking forward to trying Project Analyzer out. Just ran demo of Visustin and considering how it might best help. There is definitely something there to use; I just have to consider how best-

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Functions, procedures and sub procedures - when to choose what?
    By tiwas in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-01-2015, 09:00 AM
  2. Multiple Procedures to Execute
    By drunkenneo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2015, 04:06 AM
  3. Execute a macro in a closed workbook, or open and execute without the user noticing
    By cearaujo123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2015, 06:44 PM
  4. code to execute a keyboard shortcut or to execute a toolbar button
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2015, 12:16 PM
  5. [SOLVED] Change From Execute on Selections to Execute On All
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2014, 09:23 AM
  6. [SOLVED] Code to execute multiple tasks such as deleting rows, inserting sums, setting print area
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2013, 04:18 PM
  7. IF cell=error execute sub 1 if value execute sub 2... possible?
    By CDNcameron in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2013, 05:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1