Forum Discussion
Abramova
Staff
14 years agoHi,
To go to the next cell, you can use the Range.Offset property. Offset(1,0) moves the position to the next cell vertically. Offset(0,1) moves the position to the next cell horizontally. For example:
function Test()
{
var ex = Sys.OleObject("Excel.Application");
ex.WorkBooks.Open("c:\a.xls");
ex.Worksheets("Sheet1");
var curCell = ex.activecell;
curCell.Offset(1,0).Activate; //Activates the next cell vertically
}