The Variable column contains either a whole or part of a hyperlink; the adjacent Site column (if not empty for the active row) refers to another table for the other part of the hyperlink.
The intersect means the code can only be activated if the Variable column is selected. I also want to prevent the code from being activated if no Site is specified for the active row (because it is a whole hyperlink).
Instead of the Selection I want to refer to the Site column by name in the way that I have used names for the ranges. This will save me having to update the code when the table structure changes.
Fabrice Lambert
A Variable column ???
How are we supposed to understand that ? A column that can be anywhere ?
I still don't understand !!
Upload a sample workbook, and explain from the beginning (not just the part you attempt to solve).
Open in new window
PS:
Do you really need the Selection and ActiveCell objects ?
Be warned that they are major source of troubles.