glfiedler
Board Regular
- Joined
- Apr 1, 2019
- Messages
- 67
- Office Version
- 365
- Platform
- Windows
I have created an add-in that functions perfectly except for one annoying thing.
The add-in creates a new workbook by copying the add-in's first sheet. This new workbook is then populated with data from an archived workbook that the add-in has opened. This works well and I can watch the data being transferred since the new workbook sheet is displayed. After the add-in has transferred the data the add-in shows a Userform requesting additional data that is not contained in the archived workbook.
Now the quirk! This Userform is not "active", for lack of a better word. In order to type data into the textbox I must first click the Userform. Then all is well and later the add-in shows another Userform but it is alive and well without clicking.
It appears the application is "focused" on the newly opened WB where the data has just been transferred and I must click the Userform to get the app to focus back to the add-in. I have not been able to find anything that addresses the "focus" of workbooks.
I suspect there is one or two lines of code to fix this very minor problem. Any ideas?
The add-in creates a new workbook by copying the add-in's first sheet. This new workbook is then populated with data from an archived workbook that the add-in has opened. This works well and I can watch the data being transferred since the new workbook sheet is displayed. After the add-in has transferred the data the add-in shows a Userform requesting additional data that is not contained in the archived workbook.
Now the quirk! This Userform is not "active", for lack of a better word. In order to type data into the textbox I must first click the Userform. Then all is well and later the add-in shows another Userform but it is alive and well without clicking.
It appears the application is "focused" on the newly opened WB where the data has just been transferred and I must click the Userform to get the app to focus back to the add-in. I have not been able to find anything that addresses the "focus" of workbooks.
I suspect there is one or two lines of code to fix this very minor problem. Any ideas?