Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
after entering data in a cell and hitting enter, is there a way to goto a
specific cell |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Type the cell address into the Names box, the box to the left of the formula
bar, with a drop down arrow. -- HTH RP (remove nothere from the email address if mailing direct) "Ray" wrote in message ... after entering data in a cell and hitting enter, is there a way to goto a specific cell |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hopefully someone can be more specific, as can you actually write me the code
that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
You don't even want to take a stab at it ? NickHK "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ray,
Is it your intention that the cursor should jump to the H17 cell *only* when data is entered into the B37 cell, or are there other cursor movement scenarios? --- Regards, Norman "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My perpose is that i have a form that i fill out on a regular basis, it is
always the same format but different data, the same time data but different, so when i get to the last entry that i can enter by hitting enter then i want the cursor to move to a pre specified cell so that i do not have to use my mouse or scroll to it, simply to speed up data entry....Q&A used to have a goto programming statement to allow this... i havent found it in excel and think it would be an excellent tool to use..i do not have the pleasure of using another program being as excel is the standard of my industry, thank you in advance "Norman Jones" wrote: Hi Ray, Is it your intention that the cursor should jump to the H17 cell *only* when data is entered into the B37 cell, or are there other cursor movement scenarios? --- Regards, Norman "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry steve yes more than likely in your eye's i am a newbie, i can do quite
alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
Put this into the sheet module of your form. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$37" Then Application.Goto Reference:=Worksheets("Sheet1").Range("H17"), _ scroll:=True End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... My perpose is that i have a form that i fill out on a regular basis, it is always the same format but different data, the same time data but different, so when i get to the last entry that i can enter by hitting enter then i want the cursor to move to a pre specified cell so that i do not have to use my mouse or scroll to it, simply to speed up data entry....Q&A used to have a goto programming statement to allow this... i havent found it in excel and think it would be an excellent tool to use..i do not have the pleasure of using another program being as excel is the standard of my industry, thank you in advance "Norman Jones" wrote: Hi Ray, Is it your intention that the cursor should jump to the H17 cell *only* when data is entered into the B37 cell, or are there other cursor movement scenarios? --- Regards, Norman "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve there are other cursor movents within the same sheet such as from
B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See Chip Pearson's page on Events
http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#15
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok guys thanks for your patience, i have the code working to be able to enter
data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#16
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#17
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just to add, a possible way to do it without code is to lock all cells
(select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#18
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#19
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve:
Did you test the last code you sent? im having trouble getting it to work. "STEVE BELL" wrote: Tom, I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#20
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
This works just as you watch "word wrap". Note the line continuation "_" symbol. This makes excel see 2 or more lines as a single line. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then If Target.Column = 2 Or Target.Column = 6 _ Or Target.Column = 10 Or Target.Column = 14 Then Application.Goto Reference:=ActiveSheet.Cells(13, _ Target.Column + 4), scroll:=True End If End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Steve: Did you test the last code you sent? im having trouble getting it to work. "STEVE BELL" wrote: Tom, I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#21
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ray,
Got your workbook and fixed the code. (sent it to you by email) The issue (I forgot to tell you) is that event code goes into a sheet module or ThisWorkBook module. Not into a standard Module. You had put it into a standard module and the workbook didn't know what to do with it. I also set it up to work with your columns - ONLY, and respond if the change is on row 32. Let me know how it works... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Steve: Did you test the last code you sent? im having trouble getting it to work. "STEVE BELL" wrote: Tom, I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#22
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry you can't get it to work Steve. Probably you have misunderstood the
instructions or the intent. Glad Greg has provided code for you. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:_6UIe.1916$iE.1684@trnddc06... Tom, I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
#23
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Just rechecked to make sure and it does work in Excel 2k. (didn't in 97) My error.... Makes things a lot easier. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Sorry you can't get it to work Steve. Probably you have misunderstood the instructions or the intent. Glad Greg has provided code for you. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:_6UIe.1916$iE.1684@trnddc06... Tom, I'm still in xl2k and that doesn't seem to work for me. So I use Greg Wilson's code to protect the sheets and only allow selection of unprotected cells. -- steveB Remove "AYN" from email to respond "Tom Ogilvy" wrote in message ... Just to add, a possible way to do it without code is to lock all cells (select all cells by clicking and the juncture of the row and column labels in the blank gray button, then do format=Cells=Protection and check locked. This is the default, so you may not need to do it.) Now select only the cells that you want to tab between. Then do Format=Cells=Protection and uncheck locked. ). Now protect the workbook. Tabbing should now move you through only the unprotected cells. Hitting return will not work with this. To make return work, you have to set the enable selection property of the sheet. In xl2002 and later, this can all be done in Tools=Protect sheet and will be persistent. In earlier versions, it is harder. Just something you can experiment with. -- Regards, Tom Ogilvy "STEVE BELL" wrote in message news:4WRIe.190$Y2.161@trnddc09... Ray, There seems to be a pattern to your choices. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 32 Then if target.column = 2 or target.column = 6 or target.column = 10 or target.column = 14 then Application.Goto Reference:=ActiveSheet.Cells(13, Target.Column + 4), scroll:=True end if End If End Sub ================ You could also create a Case select where case is 2,6,10,14 -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... ok guys thanks for your patience, i have the code working to be able to enter data into B32 and hit enter, the cursor moved to F13, now i still need to be able to do the same thing from F32 to J13, then from J32 to N13. then from N32 to R13. is this all 1 code or do i write seperate codes???? thanks for you help in advance B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 "Tom Ogilvy" wrote: See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm to determine if you put the code in the right place. -- Regards, Tom Ogilvy "Ray" wrote in message ... Steve there are other cursor movents within the same sheet such as from B32 to F13, then from F32 to J13, then from J32 to N13. then from N32 to R13 also i have found the worksheet change in vbe, i copied and pasted what u sent but cant seem to make it work "STEVE BELL" wrote: Ray, Not to worry! We've all been there - done that... And the only schooling I've gotten is reading this ng... I only asked - because if we know you are "new" we put more detail into our replies.... Keep on Exceling... -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... sorry steve yes more than likely in your eye's i am a newbie, i can do quite alot of programming in excel but i have not been to school on it, nor am i in a position of programming daily in excel, i have never used visual basic editor "STEVE BELL" wrote: Ray, Sorry you couldn't run with the code I gave you... Are you a newbie??? If so - you should mention that in your next post... Private Sub Worksheet_Change(ByVal Target As Range) If target.Address = $B$37 then Range("H17").Select End If End Sub -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... Hopefully someone can be more specific, as can you actually write me the code that say when i am on cell b37 that after i enter the data into that cell and hit enter the cursor will move to the cell h17 "STEVE BELL" wrote: Ray, I sometimes use a worksheet change event Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Select End Sub You can restrict it to respond to only certain cells You can use variables in your goto Range. The goto range can be a named cell or named range You can use goto code You can use scroll code -- steveB Remove "AYN" from email to respond "Ray" wrote in message ... "Ray" wrote: after entering data in a cell and hitting enter, is there a way to progaram the cell to automatically goto a specific cell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
goto function in macro 2 | Excel Discussion (Misc queries) | |||
goto function in macro | Excel Discussion (Misc queries) | |||
A goto function for Mobile Excel | Excel Worksheet Functions | |||
Goto statement in an IF function | Excel Worksheet Functions | |||
GOTO Using the ()NOW Function Q | Excel Programming |