Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default measuring load time

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default measuring load time

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default measuring load time

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - Measuring Time -subsecond PShield Excel Discussion (Misc queries) 2 August 22nd 06 10:17 AM
Time to load spreadsheet Scudo New Users to Excel 4 January 8th 06 05:51 PM
Slow Add-in Load Time RyanK Excel Programming 0 June 11th 04 04:17 PM
Measuring Time in a user form syntax Martha[_2_] Excel Programming 4 May 20th 04 08:05 AM
Long time to load john Excel Programming 5 December 13th 03 06:16 PM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"