Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

general

ResolvedVersion 2003

Vishal has attended:
Access Introduction course
Access Intermediate course
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Advanced course

General

Please explain use of the locals and immediate windows in the VB editor, and provide examples of when you should use them

RE: General

Hi Vishal

Thank you for your question

The Immediate Window is a window in the VBE where you can enter commands and view the contents of variables while you code is in Break mode. The Debug.Print statement can be used anywhere in your code to display messages or variable values in the Immediate Window. It can therefore be used to keep track of the values of variables and is useful for tracking down bugs that arise from logic errors.

The Locals Window is also useful for tracking down logical flaws in a procedure. It displays all the variables in a procedure and their values. Thus it easy to see exactly what the changing value of each variable is as you step through the code.

Regards

Stephen

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Changing Excel file and worksheet defaults

The appearance of any new Excel files or any new worksheets that are inserted into a file are controlled by two template files, Book.xlt and Sheet.xlt.

By opening, modifying and saving these templates you can change the default settings for all new files and/or all newly inserted sheets.

Use Book.xlt to make change to defaults for new workbooks; and Sheet.xlt to change defaults for sheets.

If you can't find either of these files on your computer, you can create and save them yourself.

You can do this simply by creating a new workbook with the setting you want to use as your defaults; then saving them with the appropriate name in the XLStart folder. If you are using Office 2003, this is usually found in C:\Program Files\Microsoft Office\Office11\XLStart.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.