Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Leaving the cursor at a known position on a worksheet
How do I correct the following code to not give a 1004 error:
NewStatusSheetName = "newsheetname" .... Sheets(NewStatusSheetName).Range("$A$1").Select .... My macro jumps between two sheets and I want to leave the cursor at the top of the new sheet at the end. I found that the following works, but I don't know if a Go To is the best solution: Application.Goto Sheets(NewStatusSheetName).Range("$H$1") I appreciate your help, -John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Leaving the cursor at a known position on a worksheet
Hi
Set NewStatusSheet = Worksheets("NewSheetName") NewStatusSheet.Range("$A$2").Select or NewStatusSheetName = "NewStatusSheet" Worksheets(NewSheetName).Activate Range("$A$2").Select Hopes this helps. --- Per "John" skrev i meddelelsen ... How do I correct the following code to not give a 1004 error: NewStatusSheetName = "newsheetname" .... Sheets(NewStatusSheetName).Range("$A$1").Select .... My macro jumps between two sheets and I want to leave the cursor at the top of the new sheet at the end. I found that the following works, but I don't know if a Go To is the best solution: Application.Goto Sheets(NewStatusSheetName).Range("$H$1") I appreciate your help, -John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cursor position | Excel Discussion (Misc queries) | |||
VBA code for cursor movement without leaving scroll area | Excel Programming | |||
Cursor Position in VBE | Excel Programming | |||
Cursor Position in VBE | Excel Programming | |||
cursor position | Excel Programming |