The cursor is active on an active excel sheet. A form is open. On Clicking a command button on the form, I want the cursor to offset one row. I am using the following:
Private Sub btnLOCback_Click()
Selection.Offset(-1, 0).Select
End Sub
When I click the command button the first time, it offsets properly. When I click it the second time, nothing happens. When I click it the third time, the cursor offsets properly again.
Essentially the button must be clicked twice.
This only happens when the button is on a form. If the button is on the spreadsheet, it works with one click per offset.
Any suggestions?
Private Sub btnLOCback_Click()
Selection.Offset(-1, 0).Select
End Sub
When I click the command button the first time, it offsets properly. When I click it the second time, nothing happens. When I click it the third time, the cursor offsets properly again.
Essentially the button must be clicked twice.
This only happens when the button is on a form. If the button is on the spreadsheet, it works with one click per offset.
Any suggestions?