VBA Structure - VBA Structure Objects Application,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
VBA Structure Objects Application, Workbooks (a collection of Workbook objects), Worksheets, (a collection of Worksheet objects), Range, etc. To refer to a specific item within a collection (e.g. Worksheets), include the name within parentheses (e.g. Worksheets(“Sheet1”)) or using an index number (e.g. the second worksheet in a workbook could be referenced as Worksheets(2)) Properties o E.g. Range(“B1”).Value Methods (actions performed with objects) o E.g. Range(“B1”).ClearContents Note that objects may contain other objects, as well as various properties and methods Object Browser o Press F2 OR View – Object Browser o Allows you to view the properties and methods for every object Entering VBA Code Lines of code are executed sequentially, unless the code redirects to another code location VBA uses spaces between operators Insert a comment by preceding a statement with an apostrophe (include comments as you are writing code, not as a final step)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/20/2011 for the course ACIS 2504 taught by Professor Mtgriffin during the Fall '08 term at Virginia Tech.

Page1 / 2

VBA Structure - VBA Structure Objects Application,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online