AppActivate

B

BristolBloos

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
 
B

Bernie Deitrick

Prasad,

You should consider

1) using your in-house app as the dictator application, which controls Excel rather than the other
way around. It's easy to do, since Excel's object is available through VBA.

2) using Excel userforms to collect the same input.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top