Results 1 to 4 of 4

Thread: Cell Navigation

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    2

    Cell Navigation

    I am a super newbie when it comes to vbscript so bear with me.

    I am trying to use either a macro or some script to activate a given cell using the MoveAfterReturn function.

    When I enter a value in B11 and hit enter on the keyboard, I want the next active cell to be C6.

    So far I have:
    VB Code:
    1. Public Sub Workbook_Activate()
    2. Range("B11").Select
    3. MoveAfterReturn = True
    4. Application.Goto Reference:=Worksheets("VERBS-REG").Range("c6")
    5.  
    6. End Sub
    This works if I run the script in MVB, but not if I hit enter.

    Any help would be great.






    Edit: Added [vbcode][/vbcode] tags. - Hack
    Last edited by Hack; Nov 16th, 2005 at 07:25 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Cell Navigation

    Excel question moved to Office Development.

  3. #3
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Cell Navigation

    Jim
    Copy the attached into the code page for the "VERBS-REG" worksheet.

    This code will execute every time a change is made to that worksheet, when the change is made in cell B19 it will then select cell C6.

    VB Code:
    1. Private Sub Worksheet_Change(ByVal Target As Range)
    2.     If Target.Address = "$B$19" Then Range("C6").Select
    3. End Sub
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    2

    Re: Cell Navigation

    That works a treat. Thanks very much.

Posting Permissions

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



Click Here to Expand Forum to Full Width