Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default LOG FILE RECORDING USERS TIME

Hi all,

I have one sheet wherein I have allowed access to certain users, who need to
enter threi user id and password to get access to sheet. User Id and password
are verifed from another sheet "Password.xls" who has ID and realted password.

I want to have on log recording User id with time of Log in and Log out in a
separate file may be .xls or any doc file.

Thanks for help in advance.
SS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default LOG FILE RECORDING USERS TIME

I'd probably put this in another worksheet in the workbook and make it very
hidden.

Column 1: UserID
Column 2: LogIn
Column 3: "LogOut" which would be on Workbook close.

Use something like this

On LogIn
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow+ 1,1) = UserID
LFWS.cells(lRow+1,1) = Date + Time

Put this in the Workbook_Close event
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow,3) = Date + Time

--
HTH,
Barb Reinhardt



"SANDIND" wrote:

Hi all,

I have one sheet wherein I have allowed access to certain users, who need to
enter threi user id and password to get access to sheet. User Id and password
are verifed from another sheet "Password.xls" who has ID and realted password.

I want to have on log recording User id with time of Log in and Log out in a
separate file may be .xls or any doc file.

Thanks for help in advance.
SS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default LOG FILE RECORDING USERS TIME

Hi Barb,

Thanks for your quick reply. I am sorry, I am new to VB, should have
informed that earlier, sorry for that.

Can you please let me know where to put the codes, as I am getting some line
RED when I am copying this code in THIS WORKBOOK.

and one more thing, will ID will be picked automatically as I have given ID
in another sheet and I run one Inpot Box to enter ID and Password to verify
the same.

Thanks again for your kind help.
SS

"Barb Reinhardt" wrote:

I'd probably put this in another worksheet in the workbook and make it very
hidden.

Column 1: UserID
Column 2: LogIn
Column 3: "LogOut" which would be on Workbook close.

Use something like this

On LogIn
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow+ 1,1) = UserID
LFWS.cells(lRow+1,1) = Date + Time

Put this in the Workbook_Close event
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow,3) = Date + Time

--
HTH,
Barb Reinhardt



"SANDIND" wrote:

Hi all,

I have one sheet wherein I have allowed access to certain users, who need to
enter threi user id and password to get access to sheet. User Id and password
are verifed from another sheet "Password.xls" who has ID and realted password.

I want to have on log recording User id with time of Log in and Log out in a
separate file may be .xls or any doc file.

Thanks for help in advance.
SS

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default LOG FILE RECORDING USERS TIME

You may be getting red lines because the line of the code splits and you
don't have " _" at the end of the line. Just make sure you have that.

In the ThisWorkbook module, make sure you have selected Workbook and CLOSE
at the top of the screen and enter the info there as needed.
--
HTH,
Barb Reinhardt



"SANDIND" wrote:

Hi Barb,

Thanks for your quick reply. I am sorry, I am new to VB, should have
informed that earlier, sorry for that.

Can you please let me know where to put the codes, as I am getting some line
RED when I am copying this code in THIS WORKBOOK.

and one more thing, will ID will be picked automatically as I have given ID
in another sheet and I run one Inpot Box to enter ID and Password to verify
the same.

Thanks again for your kind help.
SS

"Barb Reinhardt" wrote:

I'd probably put this in another worksheet in the workbook and make it very
hidden.

Column 1: UserID
Column 2: LogIn
Column 3: "LogOut" which would be on Workbook close.

Use something like this

On LogIn
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow+ 1,1) = UserID
LFWS.cells(lRow+1,1) = Date + Time

Put this in the Workbook_Close event
Dim LogFileWS as Worksheet
Set LogFileWS = Worksheets("LogFile")

lRow = LFWS.cells(LFWS.rows.count,1).end(xlup).row
LFWS.cells(lRow,3) = Date + Time

--
HTH,
Barb Reinhardt



"SANDIND" wrote:

Hi all,

I have one sheet wherein I have allowed access to certain users, who need to
enter threi user id and password to get access to sheet. User Id and password
are verifed from another sheet "Password.xls" who has ID and realted password.

I want to have on log recording User id with time of Log in and Log out in a
separate file may be .xls or any doc file.

Thanks for help in advance.
SS

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
Possible for users to open file at the same time? quartz[_2_] Excel Programming 3 August 18th 05 05:50 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM
Recording time in Excel Trish Hodge Excel Discussion (Misc queries) 1 February 2nd 05 08:33 PM
Prevent end users from manually running or recording macros Township of East Hanover Excel Programming 0 June 14th 04 06:03 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


All times are GMT +1. The time now is 12:57 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"