Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default username & password check

OK but first clarify this for me please, how will you know who's who? Get
the logged on username?

"Jack" wrote in message
...
Thank you so much for your suggestion Philo,
But I'd prefer not to use forms but just hide written data
(usernames&passwords) from Sheet3. Could you modify your code to

accomplish
that.
Regards


"Philo Hippo" wrote in message
...
Hi Jack,

create a small form with 2 fields, one for the username the other for

the
password.
Call it up from the ThisWorkbook.Workbook_Open event and search for the
username then match the password.

sub cmdOKButton()

with sheet3.UsedRange
CurRow=1

Do Until IsEmpty(Cells(CurRow, 1)) 'Syntax:
Cells(RowIndex,ColumnIndex)
if Cells(CurRow, 1).value=txtUserName.text then
if Cells(CurRow, 2.value=txtPassword.text then
sheets("sheet1").activate
unload me
else
msgbox "the password provided is incorrect,
please try again"
txtPassword.setfocus
end if
else ' Username not found
msgbox "I'm sorry you do seem to be a registered

user,
please contact the Administrator"
unload me ' or thisworkbook.close or

application.quit
end if
CurRow=CurRow+_1
Loop
end with

end sub

"Jack" wrote in message
...
Hi,
I have a workbook of which I have usernames (column A:A) and passwords
(column B:B) on Sheet3. I have some tables, forms etc. on Sheet1 but I

want
to allow using this page to people only which can input matching
username&password with Sheet3. Can anyone suggest VBA solutions?.
TIA








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
link to workbook from web page asks for username and password BC Excel Discussion (Misc queries) 0 October 16th 09 03:56 PM
How do I get a adcenter username and password Chops Excel Discussion (Misc queries) 0 November 11th 08 11:31 PM
Is there a template for username and password storage for Excel? help Excel Discussion (Misc queries) 1 May 17th 05 03:29 PM
creating a username and password box kil Excel Programming 1 May 20th 04 08:20 AM
username and password for form excel vba macro finalfantasy_2u Excel Programming 0 January 9th 04 06:07 AM


All times are GMT +1. The time now is 10:53 PM.

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"