Ever since I joined the company, I have had a real problem with forgetting to imprint of working hours.

When I forget to imprint, I sometimes look at the PC log in the event viewer and then manually input the data, but it was a hassle to open the event viewer.

By the way, if you type Windows key + R → “eventvwr”, you can open it in one shot. After all, it takes quite a long time to search the system logs.

Of course, this is fine, and I do it too.

It’s too much trouble to do that, so show me the logs with just one button. If you are the kind of person who would like to see this, here is a tool that allows you to get PC logs with the push of a button in an Excel tool.

2022/12/24, Fixed a bug that caused an error when opening English Ver in an environment where Japanese locale is not available.

 

Results of PC event logging

As shown in the image below, this tool outputs a specific event ID in the event log.

We sometimes show this PC log when we are audited by external auditor. In my previous company, we used this log as it is as imprinting data as a working hour record. I think it is credible data.

In Ver1.0, the tool only acquired event IDs “7001” and “7002”, but after the update, it now acquires multiple event IDs.

Incidentally, it also has a function to output the above data.

 

Download link

Please kindly download tool from the following link. 

 

How to use (set up) the tool

1. Flag the event ID to be acquired on the Settings sheet.

Get the data for the event ID that has 1 entered in the detection Flg in column A.

The well-known ones are 7001 and 7002. At a minimum, you should flag these two.

This function has been added since “Ver. 2.0”.

 

2. enter start and end dates

Enter the start date (cell H2) and end date (cell H3).

 

The log for the date entered here will be output. If the end date is blank, logs up to that day will be obtained.

 

Click the “Get Event Log” button.

After entering the start and end dates, click the “Get Event Log” button.

 

3. specify the output destination and save the log file

Log files can be output to a specified folder.

 

After clicking Save, the following message appears and the file is output to the specified folder.

If Cancel is selected without selecting a destination in this step, the log information will be written on a sheet in the tool and the process will be terminated.

 

4. Log information is output to the log file and the tool itself

The same log information is output (described) in the output file and the tool itself.

 

At the end

You may not often look at the event log, but if you are like me, you may use it a lot…?

I would be glad if you could find out that you can use VBA to get event logs.

 

Update history

バージョン 更新日 内容
1.0 2021/03/31 First edition
2.0 2021/12/22 Changed specifications so that the specified event ID can be obtained
2022/12/24 Fixed a bug that an error occurs when opening English Ver in an environment where Japanese locale is not available.