Hi,
Would it be possible to time how long it takes for Excel to open a workbook
and dump the result (amount of seconds) in a cell? I can't find anything
about this on the net, but I'd like to know if it's possible at all?
I modified what I found at this site :
http://www.vbaexpress.com/kb/
getarticle.php?kb_id=405
to measure load time of a workbook. The following code will work if
you're measuring how long a particular workbook opens.
There is a way to modify this code to check ans see how long Add-
in'stake to load, but it would be kinda clunky as far as I envision
it. If that's what you're trying to do let me know and I can share my
thoughts, but try this to see load time of a particular file:
'Add this code to the Workbook_Open Routine
Dim oFSO As Object, Folder As Object, File As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set Folder = oFSO.GetFolder(ThisWorkbook.Path & "\")
For Each File In Folder.Files
If UCase(File.Name) = UCase(ThisWorkbook.Name) Then
MsgBox Format(Now - File.DateLastAccessed, "hh:mm:ss")
End If
Next File
Set oFSO = Nothing
Set Folder = Nothing