#1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default AppActivate

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


"BristolBloos" wrote in message
oups.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with AppActivate. BristolBloos Excel Programming 1 October 14th 05 08:27 AM
appactivate Philip Kopf Excel Programming 2 August 23rd 04 05:08 AM
appactivate Philip Kopf Excel Programming 3 August 23rd 04 05:06 AM
AppActivate problem when called twice SuperJas Excel Programming 0 March 3rd 04 06:41 AM
AppActivate trouble... David Kay Excel Programming 1 December 11th 03 12:17 AM


All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"