Thread: AppActivate
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BristolBloos BristolBloos is offline
external usenet poster
 
Posts: 16
Default AppActivate

Hi,

I have sent this email yesterday but have not received any suggestions.
May be I have not explained properly. Will try again.

I have got a command button on my excel sheet which when pressed,
initially, executes the following code:
-----------------------------------------------
AppActivate ("App1 ")
Do
Sleep 2000
Loop Until UCase(Left(GetWinInfo, 9)) = "App1 "
AppActivate ("App1 ")
-----------------------------------------------

The main purpose of executing the above code is to activate the
application App1. App1 is not an excel workbook. It is our in-house
application with several forms wherein users can key in their inputs.

So, from my excel sheet, I basically want to activate App1 and show it
on the screen. Later, using SendKeys, send some user commands onto App1
form that is curently displayed.

My code is working if I maximise App1 and set focus to it and then go
to my excel sheet and press the command button.

But, if App1 is minimised (not focus) then my code is not working.

I am developing this macro for someone else to use it. Therefore I want
it to run even when App1 is minimised and has no focus.

I hope I have explained it properly this time.

Therefore, I need some suggestions about how to achieve this task.

Thanks & Regards,
Prasad