Posts by 51degreesNorh

    I've been thinking about your explanation.

    In an empty workbook , I've put some strings in range E:5 to E10. On sheet level, I run this code:

    And on module level:

    Sub AcceptVar(ByVal Loc As String)
    Range("A1").Value = Loc
    End Sub

    Click on a cell in E5 to E10, >>> A1 gets the value of the string clicked. Then, if you click anywhere outside that range, the string in A1 disappears.

    It is exactly this behavior I don't understand. Why the 'reset' ? You would expect 'overwrite' as per VBA code.

    Interestingly, if I place the call for the sub inside the If block, cell A1 remains as it is, that is, when clicking outside the E range. Click inside the E range and hurray, the desired change takes place. So yes, I am still scratching my head ....

    Again, muchas gracias !

    I'd like to use event code to set two variables in order to pass them to a sub (module) for further processing. I can use event code for one variable - no problem. Is it possible to perform the same trick for two variables ?

    Something like this code:

    Thank you.