+ Reply to Thread
Results 1 to 6 of 6

Moving automatically from one cell to another

  1. #1
    Registered User
    Join Date
    06-06-2006
    Posts
    7

    Question Moving automatically from one cell to another

    Hi,

    I would like to know if there is a function that enables the automatic movement from one cell to another. For example, i have a function in B1 that works on the value of A1. After inserting the value in A1, I want to move automatically from A1 to C1 or to any other cell.

    Thanks for your assistance.

    Regards

    Stefan

  2. #2
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    Try this, it isn't perfect...

    Sub auto_open()

    ThisWorkbook.Worksheets("Sheet1").OnEntry = "DidCellsChange"

    End Sub


    Sub DidCellsChange()
    Dim KeyCells As String

    KeyCells = "A1"

    If Not Application.Intersect(ActiveCell, Range(KeyCells)) _
    Is Nothing Then KeyCellsChanged

    End Sub

    Sub KeyCellsChanged()

    Range("C1").Select

    End Sub
    Google is your best friend!

  3. #3
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    The problem with that macro is that it selects the cell before the Enter or Tab, so it actually go to 1 offset of the cell you want them to go (in this case, if they tab, it goes to D1, if they Enter, it goes to C2).

    Perhaps someone can shred some light on it

  4. #4
    excelent
    Guest

    RE: Moving automatically from one cell to another

    Put in sheet's kodewindow

    Private Sub Worksheet_Change(ByVal Target As Range)
    If ActiveCell = Range("a2") Then ActiveCell.Offset(-1, 2).Select
    End Sub


  5. #5
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    Nice and clean, Nice =)

  6. #6
    Registered User
    Join Date
    06-06-2006
    Posts
    7
    thanks for your help

    Stefan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1