Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




NEED HELP


ok i'm kinda new at this program and new at this site,

i was wondering if anybody cna give me the code ,
like i want to make it so you have to log in befor you enter the main program, like i have the code and all(which i got form VB it's self) and now i want it to when i clcik that ok botton after i put in username and pass its takes me to form1. so what will i have to add so it takes me there instead of hideing.
this is code they gave meCode:Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    'check for correct password
    If txtPassword = "password" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        Me.Hide
    Else
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
    Copyright © 2005-08 www.BigResource.com, All rights reserved