Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Environ user tracking


Hello,
I want to track the users that go into my excel reports.

I am new to VB and only use within Macro's usually, however am tryin
something a little more tricky at the moment.

I have failed to get any of the Environ type code to work (probably du
to my ability).

What I need to do is either
a) append a user row every time someone goes into the file in an exce
file (needs to be a different excel file to the one being used as th
one being used has to be read only)
or
b) add a row to a separate text file to show the user.

Please could you help, I am learning, but this is a bit beyond me (
really need all the code and where to put it).

Thanks in hope!!:)

Gerain

--
geraintathoma
-----------------------------------------------------------------------
geraintathomas's Profile: http://www.excelforum.com/member.php...fo&userid=2977
View this thread: http://www.excelforum.com/showthread.php?threadid=49487

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Environ user tracking

Try something like

Sub Auto_Open()
Dim Rng As Range
Application.ScreenUpdating = False
Workbooks.Open filename:="C:\Test\Whatever.xls"
Set Rng =
Workbooks("Whatever.xls").Worksheets("Sheet1").Cel ls(Rows.Count,
"A").End(xlUp)
Rng(1, 1).Value = Format(Now, "hh:mm:ss dd-mmm-yyyy")
Rng(1, 2).Value = Environ("username")
Rng(1, 3).Value = Environ("computername")
Workbooks("Whatever.xls").Close savechanges:=True
Application.ScreenUpdating = True
End Sub

Change "Whatever.xls" to the name of the workbook in which you
want to log the data.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"geraintathomas"
<geraintathomas.20cftn_1135090502.8262@excelforu m-nospam.com
wrote in message
news:geraintathomas.20cftn_1135090502.8262@excelfo rum-nospam.com...

Hello,
I want to track the users that go into my excel reports.

I am new to VB and only use within Macro's usually, however am
trying
something a little more tricky at the moment.

I have failed to get any of the Environ type code to work
(probably due
to my ability).

What I need to do is either
a) append a user row every time someone goes into the file in
an excel
file (needs to be a different excel file to the one being used
as the
one being used has to be read only)
or
b) add a row to a separate text file to show the user.

Please could you help, I am learning, but this is a bit beyond
me (I
really need all the code and where to put it).

Thanks in hope!!:)

Geraint


--
geraintathomas
------------------------------------------------------------------------
geraintathomas's Profile:
http://www.excelforum.com/member.php...o&userid=29776
View this thread:
http://www.excelforum.com/showthread...hreadid=494876



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Environ user tracking


Hi Chip,
This is excellent!!
Thanks for this, it works almost perfectly, the only issue is the fil
records in the same row.
Is there any way that I could have the names record in a continuou
list?

Thanks

Gerain

--
geraintathoma
-----------------------------------------------------------------------
geraintathomas's Profile: http://www.excelforum.com/member.php...fo&userid=2977
View this thread: http://www.excelforum.com/showthread.php?threadid=49487

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Environ user tracking

change
Set Rng = Workbooks("Whatever.xls").Worksheets( _
"Sheet1").Cells(Rows.Count,"A").End(xlUp)

to

Set Rng = Workbooks("Whatever.xls").Worksheets( _
"Sheet1").Cells(Rows.Count,"A").End(xlUp)(2)

--
Regards,
Tom Ogilvy



"geraintathomas"
<geraintathomas.20ciu0_1135094402.3416@excelforu m-nospam.com wrote in
message news:geraintathomas.20ciu0_1135094402.3416@excelfo rum-nospam.com...

Hi Chip,
This is excellent!!
Thanks for this, it works almost perfectly, the only issue is the file
records in the same row.
Is there any way that I could have the names record in a continuous
list?

Thanks

Geraint


--
geraintathomas
------------------------------------------------------------------------
geraintathomas's Profile:

http://www.excelforum.com/member.php...o&userid=29776
View this thread: http://www.excelforum.com/showthread...hreadid=494876



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Environ user tracking


Hello,

The below code has worked perfectly, unfortunatley I have now gained a
Dr Watson issue.
The reports that use the code are all accessed through an Access DB,
the buttons used have hyperlinks.
When people try to access the reports they get the file opening
followed by a Dr Watson, the file then reloads without the Dr Watson.

Please help!!!! if you know of any reason for this issue.

Cheers

Geraint


--
geraintathomas
------------------------------------------------------------------------
geraintathomas's Profile: http://www.excelforum.com/member.php...o&userid=29776
View this thread: http://www.excelforum.com/showthread...hreadid=494876



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
Tracking Changes by user rciolkosz Excel Discussion (Misc queries) 0 May 30th 08 07:47 PM
Excel User Tracking stevieboy1313 Excel Worksheet Functions 3 March 31st 08 04:15 PM
User Tracking Scott R Excel Discussion (Misc queries) 0 February 6th 08 02:29 AM
Multiple user Time tracking Darren Excel Discussion (Misc queries) 0 December 11th 07 06:39 PM
tracking user activity on worksheet Wei-Dong Xu [MSFT] Excel Programming 0 November 5th 03 01:30 AM


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