I am getting the jump action in other columns even though i have this statement; If…
Jump to turn (15)
- 1I am getting the jump action in other columns even though i have this statement;
- 2i only want the GoTo to be called by activity in column 1 and no other column
- 3This code is not stopping other columns from going to jump. Can you please detec
- 4here is what my code looks like; Private Sub WorksheetSelectionChange(ByVal Targ
- 5Thanks it worked
- 6How can I use a boolean true or false to control a code
- 7Can I put this code in the same sheet where I will use it or does it have to be
- 8It does not appear as if Target.Address works; If Target.Address = "$H$2" Then I
- 9If Target.AddressLocal = "H2" Then . . . Target.AddressLocal does not work
- 10I have this location for some Dim As Boolean statements. Private Sub WorksheetAc
- 11Fantastic your suggestions worked
- 12The only other thing I need to work is this line of code; If Target.Address = "H
- 13The suggestion did not work
- 14If Target.Address = Range(“H2”).Address Then...did not work also
- 15did not work
- User
I am getting the jump action in other columns even though i have this statement; If Target.Column = 1 Then GoTo Jump
- Assistant
As an AI language model, I cannot see the entire code and understand the context of the statement, but here are some possible reasons why the jump action is happening in other columns despite the conditional statement:
- The Jump label is not only called by Target.Column = 1 condition but is also called by other conditions or events.
- There might be other code statements that modify the behavior of the program outside of the conditional statements.
- The GoTo statement could be causing issues in the program flow, leading to unexpected results.
To solve this issue, you can modify the Jump label or the code flow to ensure that it only runs under the Target.Column = 1 condition. Alternatively, you can consider using other programming techniques such as If-else statement or Select Case statement to handle multiple conditions in a more structured and predictable manner.