"An Introduction to Visual Basic Editor in Excel 2003"

Excel 2003 is supplied with the Visual Basic Editor for modifying and creating macros and for creating user defined forms.

To start the editor, open an Excel file that contains macros. Then, click the Tools menu, point to Macro and click on Visual Basic Editor.

Excel visual-basic-editor

The Editor contains two important windows: the Project Explorer and the Code window.

1) The Project Explorer
The Project Explorer located at the left hand side of the editor screen. It displays a hierarchical list of the projects and all of the items contained in and referenced by each of the projects. From the Project Explorer, it contains several elements:

  • VBAProject - the name of an open workbook.
- Microsoft Excel Objects: The worksheets and chartsheets contained in the VBAProject. The event procedures for each sheet and the workbook are stored here.
- Forms: any user defined forms.
- Modules: recorded and written procedures.

2) The Code Window
Use the Code window located at the right hand side of the editor screen enables you to write, display and edit Visual Basic code.

To open a Code window from the Project Explorer window, just double-click on a form or module in the Project Explorer. You can highlight and drag the selected text to a different location in the current Code window or to another Code window.

Here are the components on the code window:

  • Procedures/Events Box
Lists all the events recognised by Visual Basic for a form or control displayed in the Object box. When an event is selected, the event procedure associated with that event name is displayed in the Code window.

If (General) is displayed in the Object box, the Procedure box lists any declarations and all of the general procedures that have been created for the form. If editing module code, the Procedure box lists all of the general procedures in the module.

  • Object Box

Displays the name of the selected object. Click the arrow to the right of the list box to display a list of all objects associated with the form.

  • Split Bar

Dragging the Split bar down, splits the Code window into two horizontal panes, each of which scrolls separately. View different parts of code at the same time. Dragging the bar to the top or the bottom of the window or double-clicking the bar closes a pane.

  • Margin Indicator Bar

A grey area on the left side of the Code window where margin indicators are displayed. Margin indicators provide visual cues during code editing.

Can't find what you're looking for? Try Google Search!

Custom Search

Back to Top

You're viewing the visual basic editor info page, click here to go back to the Home Page

Add To Your Social Bookmarks: add to BlinkBlink add to Del.icio.usDel.icio.us add to DiggDigg
add to FurlFurl add to GoogleGoogle add to SimpySimpy add to SpurlSpurl Bookmark at TechnoratiTechnorati add to YahooY! MyWeb

Google Search:

Custom Search

Recommended Books:

Click on the image to view the details of the book.
Excel 2007 ebook
The Ultimate Guide to
Excel 2007!

PowerPoint 2007 ebook
The Ultimate Guide to
PowerPoint 2007

What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Enjoy This Site?
Then why not use the button below, to add us to your favorite bookmarking service?

Copyright © www.msoffice-tutorial-training.com. All Rights Reserved.