filmov
tv
Lesson 3 in Excel Macro VBA (Cell Reference)

Показать описание
Link for previous Lesson:
Sub My_First_VBA()
'ActiveCell
Range("A1") = ActiveCell.Address
'Offset
ActiveCell.Offset(1, 0).Select
ActiveCell = "I moved downwards"
ActiveCell.Offset(0, 5).Select
ActiveCell = "I moved to the right"
'Location of the call (Row & Column)
ActiveCell = ActiveCell.Row
ActiveCell = ActiveCell.Column
End Sub
Sub My_First_VBA()
'ActiveCell
Range("A1") = ActiveCell.Address
'Offset
ActiveCell.Offset(1, 0).Select
ActiveCell = "I moved downwards"
ActiveCell.Offset(0, 5).Select
ActiveCell = "I moved to the right"
'Location of the call (Row & Column)
ActiveCell = ActiveCell.Row
ActiveCell = ActiveCell.Column
End Sub