Dim objIE
' Create an IE object
Set ōbjIE = CreateObject( "InternetExplorer.Application" )
' specify some of the IE window's settings
objIE.Navigate "about:blank"
objIE.Document.Title = "Password"
objIE.ToolBar = False
objIE.Resizable = False
objIE.StatusBar = False
objIE.Width = 320
objIE.Height = 180
Do While objIE.Busy
Loop
' Insert the HTML code to prompt for a password
objIE.Document.Body.InnerHTML = "<DIV align=""center""><P>" & myPrompt _
& "</P>" & vbCrLf _
& "<P><INPUT TYPE=""password"" SIZE=""20"" " _
& "ID=""Password""></P>" & vbCrLf _
& "<P><INPUT TYPE=""hidden"" ID=""OK"" " _
& "NAME=""OK"" VALUE=""0"">" _
& "<INPUT TYPE=""submit"" VALUE="" OK "" " _
& "VBscrīpt:OK.Value=1""></P></DIV>"
' Make the window visible
objIE.Visible = True
' Wait till the OK button has been clicked
Do While objIE.Document.All.OK.Value = 0
Loop
' Read the password from the dialog window
GetPassword = objIE.Document.All.Password.Value
' Close and release the object
objIE.Quit
Set ōbjIE = Nothing
End Function