Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 22, 4:12 am, Hendrik.Kleine
wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don, works perfect (although I don't fully get the code). I don't need it
more detailed than this. Thanks! Hendrik "Don" wrote: On Aug 22, 4:12 am, Hendrik.Kleine wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA - Measuring Time -subsecond | Excel Discussion (Misc queries) | |||
Time to load spreadsheet | New Users to Excel | |||
Slow Add-in Load Time | Excel Programming | |||
Measuring Time in a user form syntax | Excel Programming | |||
Long time to load | Excel Programming |