Hello,
I have several modules housing different code. Each Code runs in the same Range Area. I have one module that gives a place to put a value in J5. And from there is uses Worksheet_Change to run a separate Module. I've added the "If Target.address section" after a Select Case setup. This works the way it is. But if I put another module that gives a value, or a user inputs a Value into J5 the Worksheet_Change fires off the Target address and runs the original Module that it was designed for. Giving the result I am looking for something else.
I am sure I've left something out, if I have I apologize. I figure if I can reword the Worksheet_Change Target.Address to only look for $J$5 coming out of 1 module I'd be happy unless there is another place I can stick that.
I have several modules housing different code. Each Code runs in the same Range Area. I have one module that gives a place to put a value in J5. And from there is uses Worksheet_Change to run a separate Module. I've added the "If Target.address section" after a Select Case setup. This works the way it is. But if I put another module that gives a value, or a user inputs a Value into J5 the Worksheet_Change fires off the Target address and runs the original Module that it was designed for. Giving the result I am looking for something else.
I am sure I've left something out, if I have I apologize. I figure if I can reword the Worksheet_Change Target.Address to only look for $J$5 coming out of 1 module I'd be happy unless there is another place I can stick that.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B2")) Is Nothing Then
Select Case Range("B2")
Case "Normal Test Point": ExampleNormalTestRow
Case "Blank Line": ExampleBlankLine
Case "Section Title": ExampleSectionTitleRow
Case "Accuracy": ExampleAccuracyRow
End Select
End If
If Target.Address = "$J$5" Then
Call LCB2
Call HCB2
End If
End Sub
Last edited: