PDA

View Full Version : Excel 2003 – History log file of new row inserted and any data added into it.



frank_m
01-22-2011, 03:35 PM
I need to have Excel create a History log text file and save it to the same directory of the workbook. - Then append to it every time a new row is inserted. - The appendage should be the data (if any) that is added into Column 1 and 2 of the inserted row. - In other words if a row is inserted then Excel is save but there is no data entered into BOTH the column 1 & column 2 cells, there should be no history of that recorded.


* If both the Col 1 & 2 cells do have data, then the Col 1 & 2 cell values, as well as the DATE and TIME, the computers user name, and number of the last data row in column A should be recorded. - - if a row is deleted I do not require any history logged for that.

I do not need to record the cell addresses or row#'s where the row's are inserted. (although having that would be a plus)


The Log appendages should occur when Excel is saved.

Edit: The sheets change event cannot be used because insertions are often made in design mode. - I was considering using some sort of used range row count comparison between the current SAVE EVENT and the previous save event. ( i realize that using that sort of comparison will be prone to in accuracies sometimes, (such as if the same number of rows are deleted, as were inserted, between save event's, but unless you have other ideas that are not too complex, I CAN LIVE WITH THAT, as this is not meant to be a hard and fast backup)

Sorry for asking so much.

Thanks