CHE110-L08 - declared using the Dim or Public keywords Dim...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
More on I/O & Variables CHE110 Introduction to Programming & Problem Solving
Image of page 1

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

View Full Document Right Arrow Icon
Local Variables Range("...").Value Dim x As Double, y As Double x = Range("C2").Value y = 2 * x Range("C3").Value = y Worksheet VBA Worksheet VBA Task: Read in value contained in a cell, output 2X value to another cell.
Image of page 2
Range Object Variables Dim x As Range, y As Range Set x = Range("C2") Set y = Range("C3") y.Value = 2 * x.Value OR y = 2 * x x and y are now cells C2 and C3 new value for y automatically reflected in cell C3 Range object variables Task: Read in value contained in a cell, output 2X value to another cell.
Image of page 3

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

View Full Document Right Arrow Icon
Declaring & Assigning Object Variables Object variables are declared using the
Image of page 4