edit:- Before I forget again, when you post code, please use the # icon for [Code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/Code] tags. When you use the <> icon for [Html] [/Html] tags it can sometimes cause issues if the code is misinterpreted by the board software.
On to your question,
It's a 2 part process, the first one sets the sheet to default when it is selected.
The second one creates a virtual lock on the cell, you can actually select any cell in the sheet, but as soon as the selection change is detected, it returns to the default cell.
Not sure what you're trying to do with your code, the syntax looks correct, but a little confusing, I don't understand why you have With for a single line below, or a For-Each loop for a single cell
I'm gueesing that there might be some expansion needed on the code once you get it working as needed, but what you have at the moment, I think can be achieved in a single line
Hopefully that will give you something to work with, I'm going to be offline for the rest of the day, will check to see how you got on with this in the morning.
Bookmarks