Dear Experts.
In sheet1, The cursom must move only following cells
A2,A5, C10 C15, D15, E50
Besides this the cursor should not move to any cell.
It must remain between the cells that I described above.
Please help
Dear Experts.
In sheet1, The cursom must move only following cells
A2,A5, C10 C15, D15, E50
Besides this the cursor should not move to any cell.
It must remain between the cells that I described above.
Please help
Hi,
Please Login or Register to view this content.
Without using VBA, you could also just use sheet protection.
1. Select the 6 cells you mentioned
2. Right-click and choose Format Cells..
3. Select the Protection Tab and uncheck the 'Locked' flag
4. Select Tools -> Protection -> Protect Sheet
5. On the Protect Sheet dialog window, uncheck 'Select locked cells', leaving 'Select Unlocked Cells' as the only checked option
6. Set a password (if you want, it's optional) and click OK
Not sure how reliable this is but you could try it for a while:
Please Login or Register to view this content.
Last edited by Reafidy; 05-11-2007 at 12:12 AM.
Dear Sir,
Your codes do not work.
Please review attachement
thanks
I would use Paul suggestion above if possible.
What is the problem with the code? - I opened your attachment and moved the cursor between the cells seemed to work ok.
Can anybody else test?
Readify,
It starts to move out of cell A2, but jumps right back. Sort of a flicker-then nothing.
See ya,
Dean
Really, well thats strange it works fine for me. Im confused.
Reafidy
It works ok for me
I think what is confusing them is that when they try and select any cell that is not on the allowed list, the activecell reverts back to the last cell that was allowed to be active. This is A2 when you 1st open the book.
Maybe what they want is that if the next cell in the list to become active & not revert back to the last activecell
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assisted or failed to assist you I welcome your Feedback.
Thanks mudraker,
Thought I was losin it. Maybe something like this.
Please Login or Register to view this content.
Reafidy
I see you have already replied while I was creating this code so I thought I would post it anyway
Seems to do the same as yours
Please Login or Register to view this content.
It does the same and its better
That will teach me for being lazy.
Here is another version that is much easier to adapt when cell need to be removed or additional ones added.
I wrote this after a similar question was asked in another thread
http://www.excelforum.com/showthread.php?t=599708
Please Login or Register to view this content.
Mudraker,
Thats a nice peice of code, however it seems to be selecting three cells at once?
I had 1 command in the wrong location
Please Login or Register to view this content.
Hello Everbody,
Here is a piece of code I modified to handle ranges with multiple cells in the selection. It Copies all the cell addresses into an array. Add the cell ranges you want to tab through on the sheet in the macro code in Red.
Installing the Macro:
1) Copy the Macro code using CTRL+C
2) Right Click on the Worksheet Tab of Worksheet which will Tab
3) Click "View Code..." on the Popup menu
4) Paste the code using CTRL+V
5) Press CTRL+S to save the macro
Sincerely,Please Login or Register to view this content.
Leith Ross
Nice work both of you, I was going to have a go at an array version but I wont bother now Leith has covered it nicely.
Good work chaps.
Leith
Nice code.
I knew their was a way of doing it using arrays, but do you think I could get my brain to come up with a working method last night - no I could not.
Dear All
In above example, I refer toPlease Login or Register to view this content.
Case "$A$5"
Range("c10").Select
Suppose the cusor is in cell A5, here when I press enter then coursor moves to C10
Is it possible to move move cursor in cell A2 by pressing UPARROW KEY like excel general sheet.
In other words,cursor should easily move in given cells with arrow keys.
Please help
Here is one way
Place this macro on the ThisWorkbook module. Change sheet1 as required
Please Login or Register to view this content.
A macro could be made so that the onkey command only works whilst the required sheet is active.Please Login or Register to view this content.
Last edited by mudraker; 05-19-2007 at 01:09 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks