#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
Regarding Xcel rchennag Excel Discussion (Misc queries) 1 March 5th 10 05:49 PM
Xcel bw Setting up and Configuration of Excel 1 September 7th 05 01:53 AM
xcel file CJF Excel Discussion (Misc queries) 2 July 18th 05 03:45 PM
colums in xcel **- kingdom -** Excel Discussion (Misc queries) 2 May 26th 05 01:57 PM
xcel question cokeemp Excel Discussion (Misc queries) 2 January 28th 05 12:39 AM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"