Spreadsheet.Cells
This property returns/sets individual cells as a range.
| Syntax | Parameters | Return Value |
|---|---|---|
ReadOnly Property Spreadsheet.Cells( _
Row As Integer, _
Column As Integer) As Range
|
The case of the cell. Type: Integer Type: Integer |
Range |
SVB Example
Editing cells:
Option Base 1
Option Explicit
Sub Main
Dim spr As Spreadsheet
'assigns the active spreadsheet to the object spr
Set spr = ActiveSpreadsheet
'sets the cell to work on
spr.Cells(2,3).Clear 'Clears the cell
spr.Cells(3, 3).Value = 33 'sets the value of the cell
spr.Cells(4, 3).Select 'Selects the cell
'reads the value of the cell
MsgBox "The value in cell 3, 3 = " & spr.Cells(3, 3).Value '33
End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.
