Hi,
I have a multi-sheet table with combo boxes that have xxx_Change() subs defined. Sometimes these subs launch by themselves (for example, it may happen during startup when control's contents is being initialized, etc.) when the sheet with a related control isn't the currently selected sheet, which creates havoc. I was able to cage it by including the line
If ActiveSheet.Name <> "<sheet's name>" Then Exit Sub
in the beginning of each such sub, but for certain reasons I don't find including sheet's name as a string literal a convenient method anymore. Is there a different method to unambiguously define the sheet in which a sub is described? I'm thinking about
If ActiveSheet.Name <> this_control_name.Parent.Name
which seemingly *does* work in a sandbox, but the problem is that I have multiple boxes with same names across different pages (that I wouldn't like to rename unless really necessary) and I suspect it might make defining ambiguous. Is there any other method I could also try?
Thanks
I have a multi-sheet table with combo boxes that have xxx_Change() subs defined. Sometimes these subs launch by themselves (for example, it may happen during startup when control's contents is being initialized, etc.) when the sheet with a related control isn't the currently selected sheet, which creates havoc. I was able to cage it by including the line
If ActiveSheet.Name <> "<sheet's name>" Then Exit Sub
in the beginning of each such sub, but for certain reasons I don't find including sheet's name as a string literal a convenient method anymore. Is there a different method to unambiguously define the sheet in which a sub is described? I'm thinking about
If ActiveSheet.Name <> this_control_name.Parent.Name
which seemingly *does* work in a sandbox, but the problem is that I have multiple boxes with same names across different pages (that I wouldn't like to rename unless really necessary) and I suspect it might make defining ambiguous. Is there any other method I could also try?
Thanks