Question
Unable to interrogate Excel VBA Application form controls
Hi,
I'm trying to interrogate a VBA Application UserForm that's built in Excel, however I am unable to do so. I believe the UserForm controls may be normal Form controls or Active-X ones (not too sure). The UserForm automatically launches when the workbook is launched. This is an example of a UserForm: http://chandoo.org/wp/excel-vba/user-forms/
When I use the windows adapter and try to interrogate it, the UserForm window is be recognized, but the specific controls like the textbox and dropdowns are not being recognized.
Also, in this particular case where I need to open the XLSM file (macro-enabled workbook) using a windows adapter, how should I use Excel.exe as the Path?
Am I going about this all wrong and should I be tackling this problem another way?
Thanks in Advance,
Gar
Gar,
If the VBA form is being ran strictly by the excel.exe, there isn't much we can do in the way of interrogating the form controls. Pega Robotics is limited in how we in integrate with Microsoft Office Suite programs and their components.
Robotics is provided an excel connector among other connectors to integrate with Microsoft programs. All interrogation attempts with Microsoft products are limited to outer form interrogation.
If there is another sub process to the Excel executable, you may need to attempt setting that process as the path instead of excel to see if you are able to interrogate the inner form controls that way.
Another alternative approach would be the use of send keys. You could possibly send the necessary keyboard commands through the interrogated form to navigate to each of the text fields (i.e. TAB, Enter, DOWN and UP}.
Once you are in location of one of the fields, you can use sendkeys again to emulate manual typing. Below is a link that goes into detail of the use of sendkeys through automation.
http://help.openspan.com/80/Adapters_Interrogation/SendKeys_Method.htm
http://help.openspan.com/80/Adapters_Interrogation/Key_Codes_for_Sendkeys_Method.htm
--Zach