excel - VBA code slow to run the first time each day -


i have issue, thought network drives have tested , not issue.

there 2000 files(totaling 328mb) match, used in test , takes 1.4seconds complete anytime run it, except first time each day, when takes anywhere 30secs 60 secs.

i thought dir causing issue definitively inside loop slow.

would file caching causing issue? there better way load in first line of large quantity of files

'get filenames sallfiles = dir("c:\folder\" & sfile & "??.???")  'loop through each file while len(sallfiles) > 0      scurrentfilename = sallfiles     scurrentfilepath = "c:\folder\" & scurrentfilename      'read 1st line each file     open scurrentfilepath input #1          line input #1, sfirstline      close #1       vrowdata = split(sfirstline, "~")      '(write data array code here)      sallfiles = dir  loop 


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -