The Command Button needs to have .TakeFocusOnClick set to True
Please Login or Register to view this content.
The Command Button needs to have .TakeFocusOnClick set to True
Please Login or Register to view this content.
Last edited by mc84excel; 03-24-2015 at 07:53 PM.
*******************************************************
HELP WANTED! (Links to Forum threads)
Trying to create reusable code for Custom Events at Workbook (not Application) level
*******************************************************
Wouldn't you need to loop or recurse for a control in a frame in a frame in a frame ...?
Entia non sunt multiplicanda sine necessitate
True, but I had considered the possibility of a scenario similar to this and dismissed it as being highly unlikely to occur (well for me anyway!)
If anyone wants to add a loop to the function (or make it recursive), go ahead and I'll credit you.
Difficult but not impossible IMO. I had given it brief amount of thought - For each lower level, you could test whether it returns Frame or MultiPage type and respond accordingly. If returns anything else, assume it's the 'end of the line' and grab the name. You could use object and On Error Resume Next and Err.Number <> 0
Here's the loop version. I've tested it on a control in a frame in a frame in a frame. It works.
Please Login or Register to view this content.
Here's something similar, this returns the control object instead of it's name
Please Login or Register to view this content.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks