Dialog txt Report

GomaPile

Active Member
Joined
Jul 24, 2006
Messages
334
Office Version
  1. 365
Platform
  1. Windows
Hello to all,

I am not in such a hurry for this straight off the bat. Some years back I came across a simple but very affected thread and I think it was a vba of some sort that was imbedded behind the scene. Anyways, apparently what was so cool and what I liked about it. As someone opened this excel file it recorded a dialog txt report showing; the PC name, IP address, etc etc.

It also did; you were able to place this dialog txt message file report in your choice of folder somewhere on your computer so you can look at it at a late stage.

If someone had seen this or came across something like this before, please drop a message here or a link to the thread.

Have a nice day everyone

Cheers
Goma (NASA)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Almost anything that's in the Windows registry and anything that's set in the machines environment variables can be read by VBA and displayed on screen, stored in a worksheet, written to a text file, added to an Access database, emailed to someone from Outlook as a PDF attrachment, etc.

People tend to write little routines like that when and as they need them.
 
Last edited:
Upvote 0
Almost anything that's in the Windows registry and anything that's set in the machines environment variables can be read by VBA and displayed on screen, stored in a worksheet, written to a text file, added to an Access database, emailed to someone from Outlook as a PDF attrachment, etc.

People tend to write little routines like that when and as they need them.

Hey there Ruddles thanks for the help. I think you misunderstood me mate...lol. So sorry for the confusion. I'm not after the back end of a PC machine enviro report.

When a User or a Member of a group access a specific excel file, it records and write a txt file on your computer under C drive; what User, what IP, Date/Time & Year, etc etc. What I can remember seeing ages ago something I saw like this, but it was written in a vba code:

Eg:- ImportTextFile Name:="C:\Test.txt".

If someone had seen this before or has came across something like this, please drop a message here or a link to the thread.

Cheers
Goma (NASA)
 
Upvote 0
Yes, I think we're on the same wavelength. If you just want to log accesses to a specific workbook, all you need to do is place some code in the Workbook_Open event which writes stuff to a text file - maybe something along the following lines (not tested):-

Code:
dim intfh as integer
close
intfh=freefile()
open "c:\somefolder\logfile.txt" for append as #intfh
print #intfh,format(now(),"dd/mm/yyyy hh:nn:ss");environ("username");" opened ";thisworkbook.name
close #intfh

Then in Workbook_BeforeClose you could do something like this:-
Code:
dim intfh as integer
close
intfh=freefile()
open "c:\somefolder\logfile.txt" for append as #intfh
print #intfh,format(now(),"dd/mm/yyyy hh:nn:ss");environ("username");" closed ";thisworkbook.name
close #intfh

Then in Workbook_BeforeSave you could do something like this:-
Code:
dim intfh as integer
close
intfh=freefile()
open "c:\somefolder\logfile.txt" for append as #intfh
print #intfh,format(now(),"dd/mm/yyyy hh:nn:ss");environ("username");" saved ";thisworkbook.name
close #intfh

Is that what you mean?
 
Upvote 0
Hi Ruddles, how are you today? Very good news, we're on the same page. Have ran a few tests here at work and it works well, it's up and running as we spoke recording each user now.

Thank-you! Thank-you! and I mean that :)

Have a nice weekend mate

Thanks
Goma (NASA)
 
Upvote 0
No problem - and if you need any additional info, just ask!

Oh.. erm... if you have any spare rocket parts lying about the place, my son is building a pulse jet engine... :)
 
Upvote 0
Oh.. erm... if you have any spare rocket parts lying about the place, my son is building a pulse jet engine... :)

LOL that's so funny. Yeh! ok, I'll see what I can do...lol. The only things I have lying around my home is old computer parts.

Take care Ruddles

Thanks
Goma (NASA)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top