Help with the basics. Starting out.

B

beeawwb

Ok, so I'm trying to make some objects and I realize that the things I'm
used to in Access do not carry over to Excel. I'm trying to make a user
input box. I run a function, and it pops up a box asking for the user
to input a password, masked by *'s. Masking it should be easy I assume.
Just set the properties of the text box to PasswordChar = *. That's not
the problem.

What I need help with is this.

A) Making the text box or control etc. Any way to get the user
inputting something.
B) Using this input to compare against other values in the module.

So, say I do this.

Dim passwordvalue as String

I want the text box to be passwordvalue, so that I can compare it later
like

If (passwordvalue <> "aaaa") Then Beep Else AuthUser()

Hope that makes sense. Having a slow day at work, so I'll check back
later in the day and maybe work on this throughout the day, depending
on how much work comes in. Hooray for temping. O_o

Thanks in advance.

-Bob
 
M

mudraker

Insert a UserForm Module

add Text Box
add 2 buttons - OK & Cancel

Set PasswordChar to *



Dim passwordvalue as String at module or global level as required

To display User form place this code in a macro
UserForm1.Show



Private Sub CommandButton1_Click() 'ok button
passwordvalue = TextBox1.Text
End Sub


Private Sub CommandButton2_Click() ' cancel button
End
End Su
 
B

beeawwb

Thanks! That works fine. I should be able to take that and move on t
more of the things I want to be doing with it.

-Bo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top