Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm creating a form to email a worksheet via CDO. However, of course, I
don't have email account passwords for the users of the file. I am using Inputbox to have user fill in that information, but I want the Inputbox field to result in *'s as the user enters the password. Would application.writepassword work here or is there something better? Don |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not possible....at least in Excel 2002.
You should implement a UserForm with an OK and a Cancel button along with possibly 2 textbox controls: Username, Password. Set the PasswordChar property of the Password textbox to "*" Here's a sample of form-level code that stores the Username and Password values to global variables: '-------------Start of Code------ Option Explicit Private Sub cmdCancel_Click() 'User clicked the [Cancel] button Unload Me End Sub Private Sub cmdSaveLoginParams_Click() Dim strMsgText As String strMsgText = "" If tbxUsername.Text = "" Then strMsgText = strMsgText & "-Invalid or Missing Username." & vbCr End If If tbxPassword.Text = "" Then strMsgText = strMsgText & "-Missing Password." & vbCr End If If Len(strMsgText) 0 Then 'User inputs are invalid and must be corrected strMsgText = "You must correct the following errors:" & vbCr & strMsgText MsgBox strMsgText Exit Sub Else 'Inputs are valid: Set global variables prmUsername = tbxUsername.Text prmPassword = tbxPassword.Text Unload Me End If End Sub '-------------End of Code------ Is that something you can work with? *********** Regards, Ron XL2002, WinXP "Don" wrote: I'm creating a form to email a worksheet via CDO. However, of course, I don't have email account passwords for the users of the file. I am using Inputbox to have user fill in that information, but I want the Inputbox field to result in *'s as the user enters the password. Would application.writepassword work here or is there something better? Don |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to make a field created a part of the Pivot Table Field List? | Excel Discussion (Misc queries) | |||
Make field Fixed lenght | Excel Programming | |||
How to make fx field wider? | Excel Discussion (Misc queries) | |||
Make date entered in an InputBox UK format | Excel Programming | |||
Help, need to make field go red or green | Excel Worksheet Functions |