cursor position

F

Fan Fan

How do I code the Macro to determine the current position of the cursor? Say
whether it's at A5 or at A10. For example, I instruct user to paste a block
of data that can be at least 2 row big at A1. And than start the macro. The
macro will position the cursor to A1 and than simulate the END key and the
down arrow key to go to the end of the data block. I need to know the
position of the cursor after the END key and the Down Arrow is pressed to
further code the rest of the macro. I don't know what function or statement
to use. Can anybody help? Thanks.

The simple END key and Down Arrow key coding will be something like this:
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
'the rest of the code will be based on the position of the cursor where
it is at. i.e. A1:??

Fan
 
F

Fan Fan

Hi Andy,

Thank you very much for your help. Your answer is what I am looking for.

Fan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top