LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dd dd is offline
external usenet poster
 
Posts: 95
Default Advice to speed up process

I have a file index, which inputs the paths in various columns for
Autofiltering and makes the files into hyperlinks. It takes a while to
process (22 rows takes approx 2 mins to process). There will be more files
added as work proceeds. I want to know if there is a way to speed up the
process, I've tried Application.Screenupdating = True/False, but it seems to
take longer using this.
==
If oFolder.Files.Count 0 Then
For Each oFile In oFolder.Files
If oFile.Type = filetype Then

sFile = Mid(oFile.Path, 1)

'Start of first value iPos1 =
InStr(InStr(InStr(InStr(InStr(InStr(sFile, "\") + 1, sFile, "\") + 1, sFile,
"\") + 1, sFile, "\") + 1, sFile, "\") + 1, sFile, "\")
'End of first value and start of second value
iPos2 = InStr(InStr(InStr(InStr(InStr(InStr(InStr(sFile, "\") + 1,
sFile, "\") + 1, sFile, "\") + 1, sFile, "\") + 1, sFile, "\") + 1, sFile,
"\") + 1, sFile, "\")
'End of second value and start of third value
iPos3 = InStr(InStr(InStr(InStr(InStr(InStr(InStr(InStr(sF ile, "\") + 1,
sFile, "\") + 1, sFile, "\") + 1, sFile, "\") + 1, sFile, "\") + 1, sFile,
"\") + 1, sFile, "\") + 1, sFile, "\")
'End of third value
iPos4 = InStrRev(sFile, "\")

'first string
Cells(iFile, iPathColA).Value = Mid(sFile, iPos1 + 1, iPos2 - iPos1)

Cells(iFile, iPathColB).Value = Mid(sFile, iPos2 + 1, iPos3 - iPos2)

Cells(iFile, iPathColC).Value = Mid(sFile, iPos3 + 1, iPos4 - iPos3)

Cells(iFile, iFileCol) = oFile.Name

' And a link in the Hyperlink column
Cells(iFile, iLinkCol).FormulaR1C1 = "=HYPERLINK(root &
RC[-4] & RC[-3]& RC[-2] & RC[-1] ,""HERE"")"

iFile = iFile + 1
End If
Next oFile
End If


 
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
Speed up Program Process maperalia Excel Programming 3 January 26th 06 07:54 PM
Speed up the process Ali Baba Charts and Charting in Excel 2 October 3rd 05 06:40 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM
Question to speed up a process - Patrick[_5_] Excel Programming 0 April 6th 04 04:17 PM


All times are GMT +1. The time now is 07:51 PM.

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

About Us

"It's about Microsoft Excel"