Macro log

C

CLR

Hi All........
If someone would be so kind.........I would like to know if it's possible to
build a log to a RangeName on a helper Sheet, returning the Name of each
macro as it is run, the datetime, and the ComputerUserName who ran the
macro, appending to the bottom of the Range each time any macro in the file
is run. It would be acceptable to insert a small snippet of code into each
existing macro, if necessary.

TIA
Vaya con Dios,
Chuck, CABGx3
 
T

Tim Williams

sub LogMessage(sMacro as string)
with this workbook.sheets("log").cells(rows.count,1).end(xlUp).offset(1,0)
.value=Date
.offset(0,1).value = Environ("username")
.offset(0,2).value = sMacro
end with
end sub

or something like that.

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top