Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > IT Forum > MS office Tutorials (2003 & 2007) > MS Excel 2003


Topic 37: Visual Basic Editor - Getting Started to Know the Excel VBA Feature


Reply
Views: 2340  
Thread Tools Rate Thread
  #1  
Old 01-26-2010, 12:02 PM
seema seema is offline
Administrator
 
Join Date: Oct 2009
Posts: 5,409
Default Topic 37: Visual Basic Editor - Getting Started to Know the Excel VBA Feature

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.


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.

Reply With Quote
  #2  
Old 01-26-2010, 12:03 PM
seema seema is offline
Administrator
 
Join Date: Oct 2009
Posts: 5,409
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.
Reply With Quote
Reply

New topics in MS Excel 2003





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)