Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Password when Check Box is checked

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny - 30 Jan 2007 19:03 GMT
I'm searching for VBA code or other means that would prompt for a password
when a check box is checked.  I'm not a VBA wiz kid so please be gentle if
this is a stupid question.
Johnny - 30 Jan 2007 20:51 GMT
Let me add to this.  I create a UserForm which contains a text box for the
password entry.  I've also added an "Okay" button.  What I would like to
happen is when the "Okay" box is clicked it's checks for a specific password
that I have stored in a cell on a hidden worksheet and if it matches what's
type in the it will accept the password and continue on.

> I'm searching for VBA code or other means that would prompt for a password
> when a check box is checked.  I'm not a VBA wiz kid so please be gentle if
> this is a stupid question.
Dave Peterson - 30 Jan 2007 21:57 GMT
if me.textbox1.text = thisworkbook.worksheets("hidden").range("a1").value then
 'do the work
else
 msgbox "Not this time, skippy!"
end if

> Let me add to this.  I create a UserForm which contains a text box for the
> password entry.  I've also added an "Okay" button.  What I would like to
[quoted text clipped - 5 lines]
> > when a check box is checked.  I'm not a VBA wiz kid so please be gentle if
> > this is a stupid question.

Signature

Dave Peterson

Johnny - 30 Jan 2007 22:19 GMT
Fantastic!  It worked.

> if me.textbox1.text = thisworkbook.worksheets("hidden").range("a1").value then
>   'do the work
[quoted text clipped - 11 lines]
> > > when a check box is checked.  I'm not a VBA wiz kid so please be gentle if
> > > this is a stupid question.
Johnny - 31 Jan 2007 19:01 GMT
I have a follow up question.  On the userform, how do I get the cursor to
appear in textbox1 when it loads?

> Fantastic!  It worked.
>
[quoted text clipped - 13 lines]
> > > > when a check box is checked.  I'm not a VBA wiz kid so please be gentle if
> > > > this is a stupid question.
Dave Peterson - 31 Jan 2007 19:39 GMT
Option Explicit
Private Sub UserForm_Initialize()
   Me.TextBox1.SetFocus
End Sub

> I have a follow up question.  On the userform, how do I get the cursor to
> appear in textbox1 when it loads?
[quoted text clipped - 20 lines]
> > >
> > > Dave Peterson

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.