|
|
|
Author |
Message |
crzyhomer
|
Posted: Tue Dec 20 09:32:57 CST 2005 |
Top |
Excel Programming >> 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.hide-link.com/ ;userid=2977
View this thread: http://www.hide-link.com/
Excel324
|
|
|
|
|
Chip
|
Posted: Tue Dec 20 09:32:57 CST 2005 |
Top |
Excel Programming >> 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").Cells(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"
>
> 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?action=getinfo&userid=29776
> View this thread:
> http://www.excelforum.com/showthread.php?threadid=494876
>
|
|
|
|
|
geraintathomas
|
Posted: Tue Dec 20 09:59:18 CST 2005 |
Top |
|
|
|
Tom
|
Posted: Tue Dec 20 11:44:04 CST 2005 |
Top |
Excel Programming >> 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"
>
> 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?action=getinfo&userid=29776
> View this thread: http://www.excelforum.com/showthread.php?threadid=494876
>
|
|
|
|
|
geraintathomas
|
Posted: Wed Jan 11 06:26:17 CST 2006 |
Top |
Excel Programming >> 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?action=getinfo&userid=29776
View this thread: http://www.excelforum.com/showthread.php?threadid=494876
|
|
|
|
|
|
|