-
That does work...
oops. Big Edit.
That only worked because of the change I made to show the form through a call to another sub. When I use the [VBA] 'ShowMyForm
VBA.UserForms.Add(EditForm.Name).Show[/VBA] and try to return the UserForm1.ActiveControl.Name, your code fails just like mine did.
I think the form needs to be loaded, and that can't happen in the same code that creates the form (the form doesn't exist yet to be loaded). Throwing in a call to another sub was simple and works.
I did add the line of code you wrote so that the Event wouldn't fire if the Text Box was empty.
Thanks for your help. I was banging my head on this one all day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules