PC Review


Reply
Thread Tools Rate Thread

Changing the active cell

 
 
Patrick Simonds
Guest
Posts: n/a
 
      7th Oct 2006
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 With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      7th Oct 2006
cells(activecell.row,1).Select

--
Regards,
Tom Ogilvy


"Patrick Simonds" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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 With Quote
 
Carim
Guest
Posts: n/a
 
      7th Oct 2006
Hi,

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

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


Carim

 
Reply With Quote
 
Patrick Simonds
Guest
Posts: n/a
 
      7th Oct 2006
Thanks to all, but Toms tip worked fine.


"Carim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> Believe Tom has just forgot +1 for the row ...
>
> Cells(ActiveCell.Row + 1, 1).Select
>
>
> Carim
>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      11th Oct 2006
right click sheet tab>view code>insert this>modify 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
(E-Mail Removed)
"Patrick Simonds" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing cursor outline color of active cell HappySenior Microsoft Excel Programming 3 11th Aug 2008 06:16 PM
Changing active cell within a selection with mouse-click derobin Microsoft Excel Discussion 5 18th Aug 2006 10:01 AM
Changing an active cell format in VBA Packman Microsoft Excel Misc 4 6th Apr 2006 07:02 PM
changing active cell =?Utf-8?B?ZG91Zw==?= Microsoft Excel Programming 8 2nd Apr 2005 07:07 PM
Changing active cell to a color Bob Reynolds Microsoft Excel Programming 4 23rd Nov 2004 07:39 PM


Features
 

Advertising
 

Newsgroups
 


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