Thanks. I appreciate your assistance on this. It was driving me nuts.
Two observations from examining your changes:
- I infer from your revisions that the AddFromString property isn't 100% reliable, at least for this type of deferred operation.
- I don't want to hard code the name of the form in the AddTestButton subroutine, so I'll work on that a bit.
There is good news and bad news:
Good news is that now the error 91 is gone. The button added at run-time appears and the event handler is created in the code module of the userform.
Bad news is that clicking the new button does not cause anything to happen, as if the event handler were not connecting to the event. The message box does not display. Repeatedly clicking the button (as in frustration lol) does nothing.
Any suggestions?
Chuck Lodholm
Bookmarks