Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Trevor !
-----Original Message----- Bob Sub test() Range("A5").End(xlDown).Offset(1, 0).Select End Sub This assumes there is something in at least one of the cells below A5, otherwise it will go to the last row in the sheet and try to offset from there ... which gives you error 1004 Try this: Sub Test() On Error GoTo NoCells Range("A5").End(xlDown).Offset(1, 0).Select Exit Sub NoCells: Range("A5").Select End Sub Sorry; had assumed there would be something in those cells Regards Trevor "Bob S" wrote in message ... Trevor, Thanks for the quick response. My knowledge of writing macros in limited. I inserted it into a macro but I get a run time error with the following Sub Macro1() Range("A5").End(xlDown).Offset(1, 0).Select End Sub I have obviously left something out ! Bob -----Original Message----- Bob Range("A5").End(xlDown).Offset(1,0).Select Regards Trevor "Bob S" wrote in message ... I need a macro that will move the cursor to the first blank cell in column A greater than A5. I want to put it in the "open" procedure for the worksheet to prevent the need to scroll down to it manually Thanks Bob . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move cursor in excle using macro | Excel Discussion (Misc queries) | |||
macro to move cursor one cell right | New Users to Excel | |||
Visual basic macro move cursor down 1 cell | Excel Worksheet Functions | |||
need help with macro -move cursor down then home | Excel Programming | |||
Easy question: macro to move cursor one to the right | Excel Programming |