Cell Movement - Not Working Correctly
I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Unprotect Password:="test" If Target.Address = "$C$65" Then If Target.Value 0 Then Rows("66:77").Hidden = False Range("$C$72").Select Else Rows("66:77").Hidden = True Range("C72:H76").ClearContents Range("C79").Select End If End If ActiveSheet.Protect Password:="test" When I enter a value of 1 or more in C65, it follows the code and unhides rows 66:77 and takes me to C72, which it should. But then when I enter a numeric value in C72 and hit enter, my cursor goes to C81, which is no where in the above code or anywhere else in the rest of my code. After going to C81, I can move the cursor back to C72, enter a numeric value again and hit enter, and it reacts correctly by taking me to D72 (versus C81). I've checked all my other code and there is nothing that references any of these cells/rows other than the above. None of the cells are locked either. Can someone advise what I'm doing wrong here; this is driving me CRAZY!!!! |
Cell Movement - Not Working Correctly
|
All times are GMT +1. The time now is 12:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com