Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving ActiveCell coordinates

Hi there,

I haven't performed any programming for years and I have a memory blank on
how to resolve this easy issue.

I need to save the current ActiveCell coordinates of the cursor so that I
can programmatically jump back to this cell at some later stage.

I need the code to save the current cell position and also the code to jump
back to this position. I know it involves copying the cell info to
variable(s) and using Range to jump but all my attempts have failed :(

Thanks

James

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Saving ActiveCell coordinates

Hi
first: why are you 'jumping' around at all. Normally no need for select
statements in your code

For saving try:
sub foo()
dim oldcell as range
dim oldwks as worksheet

set oldwks=activesheet
set oldcell=activecell

'your code
oldwks.activate
oldcell.select
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

"James Duncan" <James schrieb im
Newsbeitrag ...
Hi there,

I haven't performed any programming for years and I have a memory

blank on
how to resolve this easy issue.

I need to save the current ActiveCell coordinates of the cursor so

that I
can programmatically jump back to this cell at some later stage.

I need the code to save the current cell position and also the code

to jump
back to this position. I know it involves copying the cell info to
variable(s) and using Range to jump but all my attempts have failed

:(

Thanks

James


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Saving ActiveCell coordinates

James

one way:

Sub SaveAndJump()
Dim ACAddress As String
MsgBox ActiveCell.Address
ACAddress = ActiveCell.Address
Range("AC1").Select
MsgBox ActiveCell.Address
Range(ACAddress).Select
MsgBox ActiveCell.Address
End Sub

Regards

Trevor


"James Duncan" <James wrote in message
...
Hi there,

I haven't performed any programming for years and I have a memory blank on
how to resolve this easy issue.

I need to save the current ActiveCell coordinates of the cursor so that I
can programmatically jump back to this cell at some later stage.

I need the code to save the current cell position and also the code to
jump
back to this position. I know it involves copying the cell info to
variable(s) and using Range to jump but all my attempts have failed :(

Thanks

James



  #5   Report Post  
Posted to microsoft.public.excel.programming
RWN RWN is offline
external usenet poster
 
Posts: 104
Default Saving ActiveCell coordinates

A "simplistic" method (I'm simple!).

'Save the row/col values
r=activecell.Row
c=activecell.Column

'Go back
cells(r,c).select


--
Regards;
Rob
------------------------------------------------------------------------
"James Duncan" <James wrote in message
...
Hi there,

I haven't performed any programming for years and I have a memory

blank on
how to resolve this easy issue.

I need to save the current ActiveCell coordinates of the cursor so

that I
can programmatically jump back to this cell at some later stage.

I need the code to save the current cell position and also the code to

jump
back to this position. I know it involves copying the cell info to
variable(s) and using Range to jump but all my attempts have failed :(

Thanks

James





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
coordinates anna m Charts and Charting in Excel 3 October 17th 08 02:13 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
map coordinates areaume Charts and Charting in Excel 0 July 17th 06 04:35 PM
Simple way to convert UTM ED50 coordinates to decimal coordinates? Dan[_38_] Excel Programming 8 July 11th 04 04:54 PM
Converting MouseDown Coordinates to Chart Point Coordinates Steve[_50_] Excel Programming 3 December 2nd 03 06:48 PM


All times are GMT +1. The time now is 02:54 PM.

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"