PDA

View Full Version : Solved: Help Required - Audit Trials using VBA



AnkitGupta
01-30-2012, 08:31 PM
Hi,

I am new to VBA and have been asked to make an "Audit Trial" in excel using VBA. The basic idea is -

I have 2 excel sheets (A.xls & B.xls). Whenever, someone opens A.xls, the user's name and time should get saved in B.xls.

Excel A.xls is also a shared workbook.

Could anyone please help me out with this.

Thanks in advance.

Regards,
Ankit

mohanvijay
01-31-2012, 04:58 AM
User Name means the computer name?

Kenneth Hobs
01-31-2012, 06:58 AM
Is B.xls always open prior to opening A.xls?

AnkitGupta
01-31-2012, 09:15 AM
No, B.xls is not open prior to opening A.xls - so basically, the VBA code needs to open B.xls

Kenneth Hobs
01-31-2012, 10:40 AM
I would make B.xls update on open from an external file and empty that file after it's data is read into B.xls.

Here is an ADO method to write to an external file. http://vbaexpress.com/forum/showthread.php?t=22620

AnkitGupta
02-07-2012, 09:47 AM
thanks Kenneth..!!