Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Movement - Not Working Correctly
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro not working correctly | Excel Discussion (Misc queries) | |||
Filters not working correctly | Setting up and Configuration of Excel | |||
Formulas not working correctly | Excel Worksheet Functions | |||
This is not working because I didn't write it correctly | Excel Programming | |||
Sum function not working correctly in Excel (Skips Cell) | Excel Worksheet Functions |