Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Login
Hello guys
I need help creating a macro that would act as a login form for the workbook. the macro would validate the id and password from another workbook. Can anyone please help me with this? Thanks and Regards Robin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Login
sub CheckLogin
PassWordFName = "C:\MyFolder\Password.xls" Account = inputBox("Enter Account : ") PassWd = inputbox("Enter Password : ") 'Open Password File set PassWdBk = workbooks.open(filename:=PassWordFName) with PassWdBk.Sheets("Sheet1") set CheckAccnt = .Columns("A").Find _ (what:=Account,lookin:=xlvalues,lookat:=xlwhole) if CheckAccnt is nothing then msgbox("Did not find account") else OldPassword = CheckAccnt.offset(0,1).value 'get password from col B if PassWd = OldPassword then msgbox("Password Matched") else msgbox("Password did not match") end if end if end with PassWdBk.close savechanges:=False end sub "Robin" wrote: Hello guys I need help creating a macro that would act as a login form for the workbook. the macro would validate the id and password from another workbook. Can anyone please help me with this? Thanks and Regards Robin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Login Name - VBA | Excel Programming | |||
Login System | Excel Programming | |||
Login Help!!! | Excel Programming | |||
Login Box help | Excel Programming | |||
Login Box | Excel Programming |