View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Yoam69 Yoam69 is offline
external usenet poster
 
Posts: 13
Default How do I switch focus from a modeless user form back to the ex

Thanks Tom...that did it for me.

"Tom Ogilvy" wrote:

Anoter possibility is to use appactivate:

An example:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$3" Then
UserForm1.Show vbModeless
AppActivate Application.Caption
End If
End Sub


--
Regards,
Tom Ogilvy



"Yoam69" wrote in message
...
When I call a modeless user form, I want to then switch the focus back to

the
excel window that was active when the form was called, but leave the form
active (but not with the focus). Nothing I've tried has worked so far.