Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default select last dirtied cell

HI,

I would like to know how to write the code that goes back to the last
"dirtied" cell (i.e. the cell which I last typed data in before performing
VBA to copy in a cell at the top of the worksheet).

Thanks in advance,
geebee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default select last dirtied cell

If you don't do any selecting in your code, won't it still be active?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"geebee" wrote in message
...
HI,

I would like to know how to write the code that goes back to the last
"dirtied" cell (i.e. the cell which I last typed data in before performing
VBA to copy in a cell at the top of the worksheet).

Thanks in advance,
geebee



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default select last dirtied cell

at the top of your procedure

set cell = ActiveCell

then when you want to return
application.Goto cell, true

would be the best guess.

--
Regards,
Tom Ogilvy


"geebee" wrote:

HI,

I would like to know how to write the code that goes back to the last
"dirtied" cell (i.e. the cell which I last typed data in before performing
VBA to copy in a cell at the top of the worksheet).

Thanks in advance,
geebee

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default select last dirtied cell

here is an idea for you.

Sub test()
dirty_cell = ActiveCell.Address

'then
' do stuff here
'at the end of your macro

Range(dirty_cell).Select
End Sub
geebee wrote:
HI,

I would like to know how to write the code that goes back to the last
"dirtied" cell (i.e. the cell which I last typed data in before performing
VBA to copy in a cell at the top of the worksheet).

Thanks in advance,
geebee


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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
I cannot select a single cell or pull down cell contents Carolyn Fahm Excel Worksheet Functions 0 January 24th 06 04:54 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM


All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"