Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to be able to enter numbers into cells A1 through A10. Once I've
reached cell A10 I want it to automatically jump to Cell B1. How can I accomplish this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I guess this is what you are looking for.
I have hardcoded it for selection of row 11. You can play around with that. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do I just enter this code into Cell A11???
"jjk" wrote: I guess this is what you are looking for. I have hardcoded it for selection of row 11. You can play around with that. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip Pearson's page on Events
http://www.cpearson.com/excel/events.htm you would place it in the Sheet module of the sheet where you want the activity. right click on the sheet tab and select view code. -- Regards, Tom Ogilvy "Programming Cells" wrote in message ... Do I just enter this code into Cell A11??? "jjk" wrote: I guess this is what you are looking for. I have hardcoded it for selection of row 11. You can play around with that. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No. You enter into the code sheet behind the worksheet. Right-click on the
worksheet tab and choose View Code, the editor opens, and paste the code there. -- Cheers Nigel "Programming Cells" wrote in message ... Do I just enter this code into Cell A11??? "jjk" wrote: I guess this is what you are looking for. I have hardcoded it for selection of row 11. You can play around with that. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use this code. This is the SelectionChange event. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$10" Then Range("B10").Select End If End Sub or to do it for every column If Target.Row = 10 then Cells(1,Taget.Column +1).Select End If -- TommySzalapski ------------------------------------------------------------------------ TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561 View this thread: http://www.excelforum.com/showthread...hreadid=390277 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What if I want to save the document and go back into it another time.
How do I maintain the source code. Currently when I exit and go back in the source does not work anymore. "TommySzalapski" wrote: Use this code. This is the SelectionChange event. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$10" Then Range("B10").Select End If End Sub or to do it for every column If Target.Row = 10 then Cells(1,Taget.Column +1).Select End If -- TommySzalapski ------------------------------------------------------------------------ TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561 View this thread: http://www.excelforum.com/showthread...hreadid=390277 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you save the workbook after you added the code?
-- Regards, Tom Ogilvy "Programming Cells" wrote in message ... What if I want to save the document and go back into it another time. How do I maintain the source code. Currently when I exit and go back in the source does not work anymore. "TommySzalapski" wrote: Use this code. This is the SelectionChange event. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$10" Then Range("B10").Select End If End Sub or to do it for every column If Target.Row = 10 then Cells(1,Taget.Column +1).Select End If -- TommySzalapski ------------------------------------------------------------------------ TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561 View this thread: http://www.excelforum.com/showthread...hreadid=390277 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
yes I did
"Tom Ogilvy" wrote: Did you save the workbook after you added the code? -- Regards, Tom Ogilvy "Programming Cells" wrote in message ... What if I want to save the document and go back into it another time. How do I maintain the source code. Currently when I exit and go back in the source does not work anymore. "TommySzalapski" wrote: Use this code. This is the SelectionChange event. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$10" Then Range("B10").Select End If End Sub or to do it for every column If Target.Row = 10 then Cells(1,Taget.Column +1).Select End If -- TommySzalapski ------------------------------------------------------------------------ TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561 View this thread: http://www.excelforum.com/showthread...hreadid=390277 |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Go to tools - Macro - Security and change the security level from hig to medium. Reopen your file and click Enable when it asks about macros If that does not work than you have somehow deleted your code. And apologize for the error in my first post. Those numbers should hav been 11, not 10. Thank for the correction jjk -- TommySzalapsk ----------------------------------------------------------------------- TommySzalapski's Profile: http://www.excelforum.com/member.php...fo&userid=2556 View this thread: http://www.excelforum.com/showthread.php?threadid=39027 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
transfering data in another column entering more sorted data | Excel Worksheet Functions | |||
Entering Data | Excel Discussion (Misc queries) | |||
entering data using tab | Excel Discussion (Misc queries) | |||
Entering data on template and then data going to a spreadsheet. | Excel Discussion (Misc queries) | |||
entering data | Excel Programming |