Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2007

Tip: Looking for answers? Try searching our database.

How to automatically jump to neighboring cell as active cell?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AA Arens - 01 Jan 2007 02:32 GMT
I do have three columns where as the first two are combo.

I want that after choosing the value, the neighboring cell, for the
second combo is activated (selected). And after that, the thrird cell
is activated. How to perform in VB, and for 50 rows together?

Should be something like:
Cells(7, ActiveCell.Row?).Select

For your info, I do have rthis code at the moment, but that's per row
(till row C50).

If Not Intersect(Target, Me.Range("C07")) Is Nothing Then
 If Target.Count > 1 Then Exit Sub
 Application.EnableEvents = False
 Set rng = ActiveWorkbook.Names(Target.Value).RefersToRange
 Me.Range("D07").Value = rng.Offset(0, 0).Value
End If
AA Arens - 01 Jan 2007 03:23 GMT
I do actually have more than 3 colomn and want to apply the move to the
neighboring column only to the first two columns, so:

A = combo      B = combo   C /D etc normal columns
jump to B     jump to C     no jump

After a newsgroup search and the Help section, I was playing with

Worksheets("Forest").Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate

and with RANGE

But couldn't find it out. How to limit it to the first 2 columns?

> I do have three columns where as the first two are combo.
>
[quoted text clipped - 14 lines]
>   Me.Range("D07").Value = rng.Offset(0, 0).Value
> End If
Martin Fishlock - 01 Jan 2007 12:28 GMT
Hi,

This is worksheet code so you place it in the code for the worksheet.

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column < 3 and target.row < 51  _
         Then Target.Offset(0, 1).Activate
End Sub

Signature

Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.

> I do actually have more than 3 colomn and want to apply the move to the
> neighboring column only to the first two columns, so:
[quoted text clipped - 29 lines]
> >   Me.Range("D07").Value = rng.Offset(0, 0).Value
> > End If

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.