Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default logging excel events?

Ross,

I use something that I gleaned off of j-walk's site.
Should do exactly what you want.

Open ThisWorkbook.path & "\Logs\PT.log" For Append As #1
Print #1, Now, Application.UserName, "Added"
Close #1

The above will log the Date/Time, UserName and the comment "Added"
to a file named PT.log in a subdirectory of the one that the workbook
is saved in named logs (modify to suit your needs).
The beauty of this is that if the file doesn't exist, it will be created
and
if it does, it will just append to it (the directory des need to
pre-exist).

John

Ross wrote:

hi there,

could someone suggest some code which would log events into a text
file when something happens in excel?

for example, comparing items in a column representing quantity of a
product about to be delivered to the same row in another column
representing storage space available, to log the time and the two
quantities to a text file when the about to be delivered quantity
exceeds storage space.

Logging the items into a different excel workbook (i.e. log_date.xls)
would be OK, too, but not a different worksheet in the same workbook
because I don't want to be re-saving the primary workbook with a bunch
of data log in it.

thanks again. this Group is an amazing help!

Ross


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
Logging Conversations Rugby Stud Excel Discussion (Misc queries) 1 June 19th 09 11:32 PM
Logging changes SPISO Excel Discussion (Misc queries) 0 May 12th 09 05:44 PM
Logging into a website Jackblack1 Excel Discussion (Misc queries) 0 May 31st 06 05:27 PM
Where might I find an Excel template for logging DVD movies Bigedtech Excel Discussion (Misc queries) 1 March 12th 06 06:01 AM
DDE Logging Data Loss in Excel PSY_UK Excel Discussion (Misc queries) 0 December 1st 05 09:01 AM


All times are GMT +1. The time now is 01:14 PM.

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"