View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Code works, but is slow

Hi Emoe,

In addition to Dave's suggestion, try changing:

If Not Right(sFileName, 4) < ".xls" Then


to:

If Not LCase(Right(sFileName, 4)) < ".xls" Then

---
Regards,
Norman



"EMoe" wrote in message
...

Thanks Norman.

Were getting close, however I'm getting a runtime error on line:

Workbooks.Open Filename:=sPath & sFileName

I checked, and the filename is correct.

I tried it with just the name, with and without the .xls extension,
also by placing a \ slash in front of the filename, but no dice. What
am I missing?

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:
http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=495925