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
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