Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Changing the active cell

What piece of code will cause the curser to go to Column A of the active
row? So if the cell is in R21 when the code is run I want the cell to move
to A22.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing the active cell

cells(activecell.row,1).Select

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
What piece of code will cause the curser to go to Column A of the active
row? So if the cell is in R21 when the code is run I want the cell to move
to A22.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Changing the active cell

Hi,

Believe Tom has just forgot +1 for the row ...

Cells(ActiveCell.Row + 1, 1).Select


Carim

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Changing the active cell

Thanks to all, but Toms tip worked fine.


"Carim" wrote in message
ps.com...
Hi,

Believe Tom has just forgot +1 for the row ...

Cells(ActiveCell.Row + 1, 1).Select


Carim



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Changing the active cell

right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Row 5 And Target.Column = 8 Then ActiveCell.Offset(1, -6).Select
End Sub

or in a regular sub
activecell.offset(1,-20).select

HOWEVER, it is rarely desirable to select so post your code for comments.


--
Don Guillett
SalesAid Software

"Patrick Simonds" wrote in message
...
What piece of code will cause the curser to go to Column A of the active
row? So if the cell is in R21 when the code is run I want the cell to move
to A22.



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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
Changing an active cell format in VBA Packman Excel Discussion (Misc queries) 4 April 6th 06 07:02 PM
Changing the active workbook SP[_5_] Excel Programming 6 October 16th 05 10:36 PM
changing active cell doug Excel Programming 8 April 2nd 05 07:07 PM
Changing active cell to a color Bob Reynolds[_3_] Excel Programming 5 November 23rd 04 07:39 PM


All times are GMT +1. The time now is 05:52 AM.

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"