![]() |
Go to another cell on another worksheet
Excel 2002 - Two worksheets in a workbook. When hitting enter in cell L30 on
1st worksheet, want cursor to go to cell B5 on 2nd sheet. Can tihs be done? |
Go to another cell on another worksheet
Press Alt + F11 to open the Visual Basic Editor and double click the
worksheet that has cell L30 that is to act as the trigger. In the module window there are 2 combo boxes at the top of the window,directly below the toolbars. Set the combobox on the right to Worksheet and the one one the left to Change and enter the following code or copy and paste out of this reply. You will need to change the entry that says Sheet2 to the worksheet that has the cell you want selected when L30 is updated: If Target = Range("L30") Then With ThisWorkbook.Worksheets("Sheet2") .Activate .Range("B5").Select End With End If When finished it should look like this: Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("L30") Then With ThisWorkbook.Worksheets("YourSheetName") .Activate .Range("B5").Select End With End If End Sub Now, when you update L30 it will automatically move you to cell B5 in the stated worksheet. -- Kevin Backmann "Editor" wrote: Excel 2002 - Two worksheets in a workbook. When hitting enter in cell L30 on 1st worksheet, want cursor to go to cell B5 on 2nd sheet. Can tihs be done? |
Go to another cell on another worksheet
When entering info in the combo boxes I, the boxes were reversed from your
instructions - is this correct? Is there anything that needs done to activate the code - it was entered without any errors, but doesn't seem to work? Thanks. "Kevin B" wrote: Press Alt + F11 to open the Visual Basic Editor and double click the worksheet that has cell L30 that is to act as the trigger. In the module window there are 2 combo boxes at the top of the window,directly below the toolbars. Set the combobox on the right to Worksheet and the one one the left to Change and enter the following code or copy and paste out of this reply. You will need to change the entry that says Sheet2 to the worksheet that has the cell you want selected when L30 is updated: If Target = Range("L30") Then With ThisWorkbook.Worksheets("Sheet2") .Activate .Range("B5").Select End With End If When finished it should look like this: Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("L30") Then With ThisWorkbook.Worksheets("YourSheetName") .Activate .Range("B5").Select End With End If End Sub Now, when you update L30 it will automatically move you to cell B5 in the stated worksheet. -- Kevin Backmann "Editor" wrote: Excel 2002 - Two worksheets in a workbook. When hitting enter in cell L30 on 1st worksheet, want cursor to go to cell B5 on 2nd sheet. Can tihs be done? |
All times are GMT +1. The time now is 04:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com