For example: if the object is not qualified, the active or the current object (for example workbook or worksheet) is used.
Adding both arguments will explicitly locate the single cells co-ordinate."AB" : Note that, Worksheets.Use this statement to select a region.Range(A1:C10).Select The Activate method selects a cell within a selection.Range Object and Cells Property, range represents a cell, a row, a column, a selection of cells containing one or more contiguous blocks of cells, or a 3-D range. .CurrentRegion.Offset(1, 0).Resize( _ ActiveCell.Range A1 1 and Range.Value 1 Here are examples on how to set and to get a Range property value: The following sets the value of range A1 or Cells(1,1) as "2005". .Worksheets(3).Activate Rows The Rows property gives access to a specific row of a range.An object is a special type of variable that contains both data and codes. .The following example places text "AB" in range A1:B5, on Sheet2.Append fld Set fld eateField SaldoKr dbCurrency) elds.Areas.Count 1 Then MsgBox "Cannot continue, only one range must be selected." Exit Sub End If Code continues here.Rows.Count " rows by " _ Selection.The Workbook collection contains all the workbooks that are currently opened. .Columns.Count " columns selected" End Sub currentregion Property Selects from the active cells position all cells that are adjacent ( known as a region ) until a blank row and blank column breaks the region.
Using Cells is particularly useful when you want to loop through ranges.
net framework 4 client extended />
Range Examples, cells, declare a Range Object, select.A positive value for the row argument refers to a row downwards.Range is one of the most widely used objects in Excel VBA, as it allows the manipulation of a row, column, cell or a range of cells in a spreadsheet.When recording absolute macros, a selection of methods and properties use this object: Range.Select, range.FormulaR1C1 10, a generic global object known as, selection can be used to determine the current selection of a single or range cells.Example: Sub ActivateMethodExample 'select a fixed range Range A1:C10.Select MsgBox dress( False, False ) Range.Activate MsgBox dress( False, False ) End Sub The above procedure selects a fixed range of cells with a message box confirming the address of the active cell.Another way to refer to a worksheet is to use number index like the following: Worksheets(1 the above refers to the first worksheet in the collection.Public Function CreateTable(ByVal dbTemp As Database) As Boolean.