CHE110-L10 - Objects Using With Constructs, Referencing...

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

View Full Document Right Arrow Icon
Department of Chemical Engineering Objects Using With Constructs, Referencing Object Collections, Using the WorksheetFunction Object CHE110 Introduction to Programming & Problem Solving
Background image of page 1

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

View Full DocumentRight Arrow Icon
Department of Chemical Engineering Referencing Objects Using the With Construct Set x = Worksheets(1).Range("B1") Set y = Worksheets(1).Range("B2") Set z = Worksheets(1).Range("B3") Set x = Worksheets(1).Range("B1") Set y = Worksheets(1).Range("B2") Set z = Worksheets(1).Range("B3") With Worksheets(1) Set x = .Range("B1") Set y = .Range("B2") Set z = .Range("B3") End With With Worksheets(1) Set x = .Range("B1") Set y = .Range("B2") Set z = .Range("B3") End With With object .Property1 = … x = .Property2 .Method End With Example: assigning Range object variables to cells on a specific worksheet
Background image of page 2
Department of Chemical Engineering Range Object Variables Representing Multiple Cells Dim x As Range, y As Range Set x = Range("B4:B6") Set y = Range("C4:C6") y(1) = 2 * x(1) y(2) = 2 * x(2) y(3) = 2 * x(3) Dim x
Background image of page 3

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

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

This note was uploaded on 03/08/2009 for the course CHE 101 taught by Professor Coronel during the Spring '06 term at Rose-Hulman.

Page1 / 6

CHE110-L10 - Objects Using With Constructs, Referencing...

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

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