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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Managing Focus on an Input Box in Outlook

Status
Not open for further replies.

arch1tect

MIS
Jun 20, 2006
1
US
I have written a small macro that requires me to enter a password every time I send an e-mail. I am having trouble putting the focus on the password entry window when I invoke the macro. Here is a snippit of the code where I actually call the macro, does anyone have any advice?
-----------------------------------------------------------
Dim pswd As String
pswd = InputBoxDK("What is the Password for Phil to send eMail.", "Security", , 0, 0)
If pswd = "0528123" Then
Cancel = False
Exit Sub
Else
MsgBox ("Only PHIL can send E-mail from this PC!!!")
Cancel = True
LockWorkStation
Exit Sub
End If
------------------------------------------------------
 
Will something like this work?
Code:
Dim frm as Form
Set frm = "FormName"
frm.SetFocus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top