the repetition structure lecture 11 08/07/06 dan rao

14
The Repetition Structure Lecture 11 08/07/06 Dan Rao

Post on 21-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The Repetition Structure

Lecture 11

08/07/06

Dan Rao

Page 2: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The Repetition Structure

• Sequence programming structure

• The selection structure

• The repetition structure

Page 3: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The For…Next Statement

Page 4: The Repetition Structure Lecture 11 08/07/06 Dan Rao
Page 5: The Repetition Structure Lecture 11 08/07/06 Dan Rao
Page 6: The Repetition Structure Lecture 11 08/07/06 Dan Rao

For Each…Next Statement

Page 7: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The With Statement

Page 8: The Repetition Structure Lecture 11 08/07/06 Dan Rao

Using the Repetition Structure and the With Statement in Excel

• Open the monthlySales.xls workbook.

• Open the MthSales.mdb database.

Page 9: The Repetition Structure Lecture 11 08/07/06 Dan Rao

Using Microsoft Query

• Microsoft Query is a separate program that comes with Microsoft Excel, and it is usedto bring data from a database into anExcel worksheet

• Microsoft Query can retrieve data from the following database sources: Microsoft SQL Server OLAP Services, Microsoft Access 2000, dBASE, Microsoft FoxPro, Microsoft Excel, Oracle, Paradox, SQL Server, and text file databases

Page 10: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The QueryTables Collection and QueryTable Objects

• Each QueryTable object represents a worksheet table built from data retrieved from an external data source

• You can use the QueryTable object’s CommandText property to select a different set of records to retrieve from the database and display in the worksheet

Page 11: The Repetition Structure Lecture 11 08/07/06 Dan Rao
Page 12: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The Current Region Properties

• rangeObject.CurrentRegion

• It returns a range that contains the entire region in which the Range object resides.

Page 13: The Repetition Structure Lecture 11 08/07/06 Dan Rao

The Resize Method

Page 14: The Repetition Structure Lecture 11 08/07/06 Dan Rao