Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching between active windows with VBA

Status
Not open for further replies.

tgharris

Technical User
Jan 25, 2000
24
US
I'm not certain whether this question belongs in Access or in Office, but I have a project involving an Access form and a Word window. I know how to switch the focus to the Word window using the Activate method, but I want to be able to automatically return the focus to the Access form(make it the active window) without closing the Word window. Can anyone suggest something?<br>
<br>
<p>Tony Harris<br><a href=mailto:tgharris@techie.com>tgharris@techie.com</a><br><a href= > </a><br>
 
<br>
For Each myTask In Tasks<br>
If InStr(myTask.Name, &quot;Access&quot;) &gt; 0 Then<br>
myTask.Activate<br>
myTask.WindowState = wdWindowStateNormal<br>
End If<br>
Next myTask<br>
<br>
Of course Access must be the in the Systray <br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top