kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
I want a way that I could pass an argument to the active or current control that I have selected.
For example, when I double click on a textbook, there is this code that I would run.
Instead of placing the code under each textbox, I want a way where I would create a separate Sub for the code then call it each time I double click a textbox.
The issue now is how to be able to know which textbox to point to from the sub.
All the codes that will run before pointing to the textbox does not depend on the various textboxes.
But they are a bit long - the reason why I want to avoid writing them one by one.
So say I double click textbox1 then after running all my verification code, what I do is unlock the textbox1 because it has been locked before I do the double click.
Is there a way around it?
For example, when I double click on a textbook, there is this code that I would run.
Instead of placing the code under each textbox, I want a way where I would create a separate Sub for the code then call it each time I double click a textbox.
The issue now is how to be able to know which textbox to point to from the sub.
All the codes that will run before pointing to the textbox does not depend on the various textboxes.
But they are a bit long - the reason why I want to avoid writing them one by one.
So say I double click textbox1 then after running all my verification code, what I do is unlock the textbox1 because it has been locked before I do the double click.
Is there a way around it?