Sub Test() means that someone wrote a macro  code "snippet" for testing 
purposes 
with the intent to copy the successful code to a larger macro.

ReturnCell receives the address of the active cell at the beginning of the 
macro.
then the macro does lots of stuff, which could mean that other cells are 
selected.

The programmer then uses Range(ReturnCell).Select
to return to the same cell that was selected before running the macro.

it isn't "RETURNING" a value to anything, it is storing a location to "return 
to"..

paul




________________________________
From: Shiv Goel <shivyn...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Tue, February 9, 2010 7:56:18 AM
Subject: $$Excel-Macros$$ Help

What is the meaning of this code
why use Test key word 

or which value it will return 



Sub Test()
     ReturnCell = ActiveCell.Address
     
     ...procedure
     
     Range(ReturnCell).Select
End Sub
-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 
To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain @ jainayus...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!
 
We reach over 6,700 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,700 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to