Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Passing focus to another application

If shell out to another application how can I pass the focus to that
application.
When I run:

Shell "notepad.exe C:\Temp\MyFile.txt"

it starts notepad OK but the focus remains with excel. I want the focus to
goto notepad.

Thanks for any help
Fred


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Passing focus to another application

Fred,
Look at the 2nd argument to Shell.
Possibly you want "vbNormalFocus"

NickHK

"Fred" <leavemealone@home l...
If shell out to another application how can I pass the focus to that
application.
When I run:

Shell "notepad.exe C:\Temp\MyFile.txt"

it starts notepad OK but the focus remains with excel. I want the focus to
goto notepad.

Thanks for any help
Fred




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Passing focus to another application

hey

Shell "c:\windows\notepad.exe", 1

will activate your window
here is another states
0 - hide
1 - normal
2 - minimized
3 - maximized
4 - normal size but not focused
5 - minimized and not focused

i hope i have answered your question

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
Excel selected range not showing when Excel application not in focus ewolfman Excel Discussion (Misc queries) 0 January 9th 07 10:40 PM
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
passing arguments by postion through application.run ben Excel Programming 5 January 14th 05 12:22 AM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM


All times are GMT +1. The time now is 12:34 PM.

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"