![]() |
VBA for tab order/moving cursor to a certain cell
I have a spreadsheet to collect information on equipment holdings. I would
like, that when the user has filled in the required cells (cells A3, B3€¦€¦S3), that the cursor automatically goes to A4, then to B4, C4€¦..S4 and then A5 and so on. I am afraid I hardly know anything about VBA, but I am sure it must be possible. Any help would be very much appreciated. |
VBA for tab order/moving cursor to a certain cell
Frederic,
try this Private Sub Worksheet_Change(ByVal Target As Range) Dim aryCells On Error GoTo ws_exit: Application.EnableEvents = False If Target.Column 18 Then Cells(Target.Row + 1, 1).Select Else Target.Offset(0, 1).Select End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips "Frederic" wrote in message ... I have a spreadsheet to collect information on equipment holdings. I would like, that when the user has filled in the required cells (cells A3, B3..S3), that the cursor automatically goes to A4, then to B4, C4...S4 and then A5 and so on. I am afraid I hardly know anything about VBA, but I am sure it must be possible. Any help would be very much appreciated. |
All times are GMT +1. The time now is 09:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com