|
-
Nov 16th, 2005, 07:12 AM
#1
Thread Starter
New Member
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:
Public Sub Workbook_Activate()
Range("B11").Select
MoveAfterReturn = True
Application.Goto Reference:=Worksheets("VERBS-REG").Range("c6")
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.
-
Nov 16th, 2005, 07:25 AM
#2
Re: Cell Navigation
Excel question moved to Office Development.
-
Nov 16th, 2005, 10:05 AM
#3
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:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$19" Then Range("C6").Select
End Sub
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Nov 17th, 2005, 09:04 AM
#4
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|