Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Return cursor to proper place

Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same row.
or find current date in column A, offset to first empty cell on the same row.
I want my cursor to return to that position after I've used a macro.
Regards
John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Return cursor to proper place


Application.Goto Range("A1").End(xlDown).End(xlToLeft)(1, 2)
Some more code;
http://www.ozgrid.com/VBA/ExcelRanges.htm
http://www.ozgrid.com/VBA/find-dates.htm


--
Regards
Dave Hawley
www.ozgrid.com
"John" wrote in message
...
Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same
row.
or find current date in column A, offset to first empty cell on the same
row.
I want my cursor to return to that position after I've used a macro.
Regards
John


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Return cursor to proper place

Oops, wrong direction

Application.Goto Range("A1").End(xlDown).End(xlToRight)(1, 2)



--
Regards
Dave Hawley
www.ozgrid.com
"John" wrote in message
...
Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same
row.
or find current date in column A, offset to first empty cell on the same
row.
I want my cursor to return to that position after I've used a macro.
Regards
John


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Return cursor to proper place

hi
not sure if you phrased it right.
as i see it, the first cell of the first empty row would be the first empty
cell of the empty row. so to do that....
Range("A65000").End(xlUp).Offset(1, 0).Activate
once you have found the cell, do this.
dim r as range
dim s as sheet
set s = activesheet 'mark current sheet
set r = activecell. 'mark current cell
'run macro
s.select 'return to marked sheet
r.select 'return to marked cell

regards
FSt1

"John" wrote:

Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same row.
or find current date in column A, offset to first empty cell on the same row.
I want my cursor to return to that position after I've used a macro.
Regards
John

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Return cursor to proper place

Thank you both Dave and FSt1
Regards
John
"FSt1" wrote in message
...
hi
not sure if you phrased it right.
as i see it, the first cell of the first empty row would be the first empty
cell of the empty row. so to do that....
Range("A65000").End(xlUp).Offset(1, 0).Activate
once you have found the cell, do this.
dim r as range
dim s as sheet
set s = activesheet 'mark current sheet
set r = activecell. 'mark current cell
'run macro
s.select 'return to marked sheet
r.select 'return to marked cell

regards
FSt1

"John" wrote:

Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same row.
or find current date in column A, offset to first empty cell on the same row.
I want my cursor to return to that position after I've used a macro.
Regards
John

.




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
Have cursor go to specific place when worksheet opens? [email protected] Excel Discussion (Misc queries) 1 July 9th 08 03:24 AM
Place Cursor in A1 on all Sheets Q Sean Excel Programming 3 August 14th 07 09:07 AM
Select which cell enter will place the cursor mbing916 Excel Discussion (Misc queries) 3 May 1st 07 05:17 PM
Is this the proper place to ask my question? amkazen Excel Discussion (Misc queries) 1 March 1st 06 05:20 PM
why can't I place the cursor directly on certain cells? KG Excel Discussion (Misc queries) 3 January 31st 05 11:26 PM


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