Making excel always active so a Userform when triggered always appears on top
I have a excel VBA macro that runs on a machine along with several applications. The macro is continuously scanning Atttachamate Extra session for certain conditions and if the condiditions are met the Userform pops up for 30 seconds. The problem I have is that is the excel spreadsheet is not visible on the actual screen the Userform gets hidden when it pops up. Is there any way to ensure that either the excel sheet is always on top of the other applications (i.e activate command at the end of the code) or program the Userform to always be on top of all active applications? This is how I call the userform now
Just put this before showing the userform.
Windows("MyExcel.xls").activate
macrohappy
ASKER
MWGainesJR: I did just now add that to the code but the excel spreadsheet itself does not come to the front is that expected? I have not yet tested for the userform as it is a little cumbersome for the conditions to be met to trigger the parameters
MWGainesJR
you mean like sheet1?
Windows("MyExcel.xls").activate
workbooks("MyExcel.xls").sheets("Sheet1").activate
http://xcelfiles.homestead.com/API_10.html
jppinto