I have a question about how to get active control's name in real time. Here are the details.
I created a form allows users to input records(please see attached screenshot). Through the form, a user can add Anhui province's natural gas supply and demand figures in 2000. enter image description here
One function I'd like to do is when input certain record, e.g. natural gas "Total Supply" of Anhui in 2000, the form can display all Anhui's natural gas "Total Supply" near 2000 year, say, 1997-1999, in a column chart to give users a reference. When the user edits "Import", the chart will switch to "Import" accordingly.
I'm aware that OnClick() is able to help me get active text boxes' names, but there are too many boxes. I guess there must be some other easy ways. And I also feel I might need another thread to capture the active control's name if I choose not to use OnClick(), but seems multiple threads are not supported in VBA?
Thanks very much for your help in advance!