Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Remember a cell

When running a code my curser ends up moving. For
example, the active cell was D4 when everything started.
During the running of the code there is cutting and
pasteing etc. At the end of all the activity I need the
code to remember the original cell (D4) and return
there. ???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Remember a cell

Hi scrabtree

For most things you don't have to select cells.
But you can do this

Sub test()
Dim Srange As Range
Srange = ActiveCell

' your code

Srange.Select
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"scrabtree" wrote in message ...
When running a code my curser ends up moving. For
example, the active cell was D4 when everything started.
During the running of the code there is cutting and
pasteing etc. At the end of all the activity I need the
code to remember the original cell (D4) and return
there. ???



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Remember a cell

Not really. You do NOT have to make selections to cut/paste. The following,
as an example can be run from anywhere in the workbook.

sheets("sheet1").range("a1").copy sheets("sheet2").range("a1")
to get just values
sheets("sheet2").range("a1").value=sheets("sheet1" ).range("a1").value

--
Don Guillett
SalesAid Software

"scrabtree" wrote in message
...
When running a code my curser ends up moving. For
example, the active cell was D4 when everything started.
During the running of the code there is cutting and
pasteing etc. At the end of all the activity I need the
code to remember the original cell (D4) and return
there. ???



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
I cannot remember... nginear Excel Discussion (Misc queries) 3 September 17th 09 05:18 PM
Can a cell remember a number?... Markv Excel Discussion (Misc queries) 4 June 23rd 08 10:49 AM
Can someone please help me to remember tzap_1998 New Users to Excel 2 January 25th 08 11:22 AM
Why and How Does Excel Remember The Last Cell? Jim J. Excel Worksheet Functions 2 April 30th 07 10:50 PM
How do I get a cell to remember the last entry and add to it? jab Excel Discussion (Misc queries) 7 March 4th 05 05:30 PM


All times are GMT +1. The time now is 07:44 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"