I am trying to test offset property in excel vba . I am using a simple code which selects the cell which is daigonal , i.e 1 row and 1 column away from the active cell.
This is what I am doing
Sub Range_Offset()
Range(ActiveCell).Offset(1, 1).Select
End Sub
I have attached the code to a button on the sheet.
When I am clicking the button , I am getting the following error
Run-time error '1004'
Method 'Range' of object '_Global' failed
If i replacing the ActiveCell with any cell number its working . But why is ActiveCell not working. Thanks
ActiveCell.Offset(1,1).Select
instead – Peter