Posted to microsoft.public.excel.programming
|
|
goto function
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
|