Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba xcel
peace to everyone!
i used xcel 2007 n also vba which in there.. i want user login to my worksheet..so how can i do that..? thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba xcel
On Aug 15, 10:55*am, wrote:
peace to everyone! *i used xcel 2007 n also vba which in there.. i want user login to my worksheet..so how can i do that..? thanks! One way would be to create a userform, with username and password (you can set a text box property password chr to * or something to hide the password), the command button would then do a lookup against a sheet and work out if the username and password match, if they dont you could keep a count of attemps and after three close the workbook. You would then show the form from the workbook open event. You would also need to control saving the workbook (using the workbook save event) to ensure that sheets are not left visible (otherwise I could just disable the macros and gain access), a workaround could be to put the login form in another workbook and when your user enters the correct username and password it then opens the real workbook (this would depend on whether all your users are on the same network etc.)... Please note that after doing all this it still is not at all secure... To make it slightly more secure, you would make the sheet holding the password/username as "Very hidden" and lock the vba project again anyone could run code against the workbook to extract the usernames and passwords, another way would be to hold the usernames and passwords in vba but then you have a maintenance issue. A simpler and much more secure route would be put a password on the excel file but then it depends on what your trying to accomplish?! James |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba xcel
On Aug 15, 1:02*pm, wrote:
On Aug 15, 10:55*am, wrote: peace to everyone! *i used xcel 2007 n also vba which in there.. i want user login to my worksheet..so how can i do that..? thanks! One way would be to create a userform, with username and password (you can set a text box property password chr to * or something to hide the password), the command button would then do a lookup against a sheet and work out if the username and password match, if they dont you could keep a count of attemps and after three close the workbook. You would then show the form from the workbook open event. You would also need to control saving the workbook (using the workbook save event) to ensure that sheets are not left visible (otherwise I could just disable the macros and gain access), a workaround could be to put the login form in another workbook and when your user enters the correct username and password it then opens the real workbook (this would depend on whether all your users are on the same network etc.)... Please note that after doing all this it still is not at all secure... To make it slightly more secure, you would make the sheet holding the password/username as "Very hidden" and lock the vba project again anyone could run code against the workbook to extract the usernames and passwords, another way would be to hold the usernames and passwords in vba but then you have a maintenance issue. A simpler and much more secure route would be put a password on the excel file but then it depends on what your trying to accomplish?! James thanks james...for reply me.. yes i know about about userform..but how i want to match a password n username..do we need a databasa/worksheet that save all the username n password? if yes,how i can access that database? just like vb+access.. for vb+acess...i know but vb+excel..i not really good enough thanks! peace! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Regarding Xcel | Excel Discussion (Misc queries) | |||
Xcel | Setting up and Configuration of Excel | |||
xcel file | Excel Discussion (Misc queries) | |||
colums in xcel | Excel Discussion (Misc queries) | |||
xcel question | Excel Discussion (Misc queries) |