Windows 7 - Setting focus back to userform

Asked By SouthernatHear on 05-Feb-08 10:04 AM
When my code uses the pickfolder to select an Outlook folder, it takes the
focus to Outlook, then leaves it there even after the user has selected a
folder.  Can I have my code set the system focus back to the userform,
immediately after i run teh pickfolder command?




SouthernatHear replied on 06-Feb-08 06:13 PM
I still haven't figured this out.  Does anybody have any ideal how to bring
the computer's screen back to Word, after my userform collects outlook
contact data?  It only takes the focus to Outlook if Outlook is open, which
it often is.
Is there a better newsgroup to ask this question?
thanks,
Southern@Heart
DavidSisso replied on 06-Feb-08 10:21 PM
In your click event that runs the Outlook code.

Private Sub Commandbutton_Click

userform1.Hide
DoEvents
'Put Outlook code here

userform1.Show
end sub