Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Tracking changes of login & time

Hi,
I am currently tracking several spreadsheets regarding username who opens it
and when. I do this by extracting the username when the person opens the
file(workbook open event)
However since I store the data on one of the sheets I need to save the
workbook every time. This OK when the wbook is shared but I cant use this
when a user is read only.
Is there a way to track these changes(username and time of usage) without
those limitations?

Thank you,
Ozgur
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Tracking changes of login & time

Hi Ozgur,

obviously you cannot save this information into this workbook. But you
can have another file, that you can append with informations you need
(username and time of usage).

Regards,

Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Tracking changes of login & time

Write it out to a text file.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi,
I am currently tracking several spreadsheets regarding username who opens

it
and when. I do this by extracting the username when the person opens the
file(workbook open event)
However since I store the data on one of the sheets I need to save the
workbook every time. This OK when the wbook is shared but I cant use this
when a user is read only.
Is there a way to track these changes(username and time of usage) without
those limitations?

Thank you,
Ozgur



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Tracking changes of login & time

Hi Bob,
thanks for the reply (Ivan you too) if I did understand correctly I should
open a text file when the user opens this excel spreadsheet save the data on
it and close it?
Is there a intrinsic excel functionality which records such stuff? The
reason I am asking in a recent post saw this function:

Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


"Bob Phillips" wrote:

Write it out to a text file.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi,
I am currently tracking several spreadsheets regarding username who opens

it
and when. I do this by extracting the username when the person opens the
file(workbook open event)
However since I store the data on one of the sheets I need to save the
workbook every time. This OK when the wbook is shared but I cant use this
when a user is read only.
Is there a way to track these changes(username and time of usage) without
those limitations?

Thank you,
Ozgur




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Tracking changes of login & time

Hi Ozgur,

function you mention will not work with workbook open as read-only.

You can use text file as Bob suggested (or any other file). If you
decide to use text file, explore VBA help for opentextfile method.

Regards,
Ivan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Tracking changes of login & time

Hi Ozgur,

now I realized I was not clear. The function should work, but you will
not be able to write its output to a file which is open as read-only.

Regards,
Ivan

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Tracking changes of login & time

Thank you Ivan for your help

Ozgur

"Ivan Raiminius" wrote:

Hi Ozgur,

now I realized I was not clear. The function should work, but you will
not be able to write its output to a file which is open as read-only.

Regards,
Ivan


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Tracking changes of login & time

That is one of my old posts :-)

That function can get you a document property but it has little to do with
you ask. You need something like

'-----------------------------------------------------------------
Private Sub Workbook_Open()
'-----------------------------------------------------------------
Dim nFile
nFile = FreeFile
Open "C:\MyLog.txt" For Append As #nFile
Print #nFile, "Workbook " & ThisWorkbook.Path & _
" opened by " & Environ("UserName") & _
" on " & Format(Now, "yyyy/mm/dd hh:mm:ss")
Close #nFile
End Sub



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi Bob,
thanks for the reply (Ivan you too) if I did understand correctly I should
open a text file when the user opens this excel spreadsheet save the data

on
it and close it?
Is there a intrinsic excel functionality which records such stuff? The
reason I am asking in a recent post saw this function:

Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


"Bob Phillips" wrote:

Write it out to a text file.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi,
I am currently tracking several spreadsheets regarding username who

opens
it
and when. I do this by extracting the username when the person opens

the
file(workbook open event)
However since I store the data on one of the sheets I need to save the
workbook every time. This OK when the wbook is shared but I cant use

this
when a user is read only.
Is there a way to track these changes(username and time of usage)

without
those limitations?

Thank you,
Ozgur






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Tracking changes of login & time

Bob sorry didn't remember if it was you or Tom that wrote it...

Thanks again for your kind help... I will have a go at it tomrrow.

Have a nice evening.

Ozgur

"Bob Phillips" wrote:

That is one of my old posts :-)

That function can get you a document property but it has little to do with
you ask. You need something like

'-----------------------------------------------------------------
Private Sub Workbook_Open()
'-----------------------------------------------------------------
Dim nFile
nFile = FreeFile
Open "C:\MyLog.txt" For Append As #nFile
Print #nFile, "Workbook " & ThisWorkbook.Path & _
" opened by " & Environ("UserName") & _
" on " & Format(Now, "yyyy/mm/dd hh:mm:ss")
Close #nFile
End Sub



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi Bob,
thanks for the reply (Ivan you too) if I did understand correctly I should
open a text file when the user opens this excel spreadsheet save the data

on
it and close it?
Is there a intrinsic excel functionality which records such stuff? The
reason I am asking in a recent post saw this function:

Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


"Bob Phillips" wrote:

Write it out to a text file.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hi,
I am currently tracking several spreadsheets regarding username who

opens
it
and when. I do this by extracting the username when the person opens

the
file(workbook open event)
However since I store the data on one of the sheets I need to save the
workbook every time. This OK when the wbook is shared but I cant use

this
when a user is read only.
Is there a way to track these changes(username and time of usage)

without
those limitations?

Thank you,
Ozgur






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
Employee login time sheet widman Excel Discussion (Misc queries) 2 May 17th 09 03:10 PM
How can i make time schedule sheet for login logout timmings Laxman.bolli Excel Discussion (Misc queries) 2 January 6th 09 05:39 PM
Time Tracking Help Sri Excel Discussion (Misc queries) 0 April 1st 08 01:38 PM
Mac issue with macro recording user login & date (run time error ' Linking to specific cells in pivot table Excel Programming 5 May 8th 07 04:52 PM
how do I set up an employee time in/out login kordahl Excel Programming 1 April 18th 06 12:41 PM


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