Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default macro to move cursor

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
move cursor in excle using macro fdibbins Excel Discussion (Misc queries) 6 December 8th 08 06:58 PM
macro to move cursor one cell right Kodak1993 New Users to Excel 3 September 23rd 08 02:00 AM
Visual basic macro move cursor down 1 cell Roger Excel Worksheet Functions 1 September 12th 06 08:09 PM
need help with macro -move cursor down then home Ftca Excel Programming 5 October 16th 03 01:24 PM
Easy question: macro to move cursor one to the right Sean Sydor Excel Programming 2 August 24th 03 04:26 AM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"