Professional Excel Development [Electronic resources] : The Definitive Guide to Developing Applications Using Microsoft® Excel and VBA® نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional Excel Development [Electronic resources] : The Definitive Guide to Developing Applications Using Microsoft® Excel and VBA® - نسخه متنی

Stephen Bullen, Rob Bovey, John Green

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











The Call Stack (Ctrl+L)


The call stack refers to the list of procedures that were executed to get you to the procedure you're currently executing in break mode. The call stack is important for two reasons:

It shows you the execution path that got you to where you are now. This is especially important when debugging procedures that are called from multiple places within your code. It also enables you to "walk" back up the procedure stack by simply selecting the specific procedure you are interested in.

If you want to know exactly which statements in each procedure in the call stack got you into the mess that you are currently debugging, press Ctrl+L to display the Call Stack window. Double-click the procedure name located directly below the name of the procedure you are currently in. The Call Stack window will bring you to the line of code in the procedure you double-clicked that called the procedure in which the error occurred. This process will enable you to continue walking back up the call stack until you reach the line of code in the entry point procedure where the problem call originated.

The Call Stack window is only available while executing code in break mode. A typical example of a Call Stack window you would encounter during break mode is shown in Figure 16-8.

Figure 16-8. The Call Stack Window

Notice the procedure deepest in the stack is the first procedure listed and the entry point procedure is at the bottom of the list. When debugging procedures that display userforms you will see something a bit strange in the Call Stack window. An example is shown in Figure 16-9.

Figure 16-9. Non-Basic Code Entry in the Call Stack Window

The second entry, [<Non-Basic Code>], is an indication that VBA had to perform an operation "under the covers," in this case showing the userform. You can step back and forth to procedures above and below this entry, but you cannot step into this entry because it represents a procedure that is not running within VBA.


/ 225