Calling a procedure in a Module with Change Event

  • Hi,
    The below code runs perfectly in the worksheet. I want to put it in a Module so that I can call it from several other Sheets.
    I have tried all ways but still end up with Error 424 Object needed.
    I have other procedures in Modules that work under the Change Event.
    Could someone offer any assistance?
    Regards
    Ricked


  • Re: Calling a procedure in a Module with Change Event


    Thank you for the reply.


    What is shown above is the code that is in the worksheet module that works.
    To use it in other worksheets I inserted a Module and cut and pasted the Dim and Set statements and the Select Case statement into a Public Sub called ScoreColor.
    I called ScoreColor from the worksheet Change module between If Not and End If
    From then on I couldn't get it to work in the module with out error 424 on the line indicated.

  • Re: Calling a procedure in a Module with Change Event


    Here is the calling code



    This is the code in Module 2 that has the error


    On Error, Target in the calling code correctly states the value of Target
    I believe that the Target.Value is not being passed to the module code as Target.Value states empty when I highlight it.
    I can't figure out how to pass it.

  • Re: Calling a procedure in a Module with Change Event


    Let me know if this works. :cheers:


    Bruce :cool: