Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 21
Default Make Inputbox field *****'s

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Make Inputbox field *****'s

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
Make field Fixed lenght Juan Excel Programming 3 August 18th 06 05:47 PM
How to make fx field wider? [email protected] Excel Discussion (Misc queries) 3 July 10th 06 11:12 PM
Make date entered in an InputBox UK format Co-op Bank Excel Programming 5 April 10th 06 04:19 PM
Help, need to make field go red or green smoran Excel Worksheet Functions 1 October 3rd 05 04:30 PM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"