Avatar of RWayneH
RWayneH
Flag for United States of America

asked on 

Have Excel determine window focus?

Is there a way in VBA to ask Excel, what are the active windows running and set focus to the one I want?
I am running a process in QTP that dips into a Excel file that will login me into SAP.  However SAP keeps the focus and I cannot get it back to QTP after SAP is running.  Thinking the Application.SendKeys {"%Tab"} or something simuliar, but prefer looping through the active window sessions a picking the proper one to get around having to use SendKeys.

Has anyone come across this? and how did you get back to the session that you need?
Microsoft ExcelWindows OS

Avatar of undefined
Last Comment
RWayneH

8/22/2022 - Mon