View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_2_] Leith Ross[_2_] is offline
external usenet poster
 
Posts: 128
Default FileSystemObject Issues

On May 29, 12:41 am, bgetson wrote:
Leith, thank you for your suggestion, but that still hasn't seemed to
solve my problem. You're right, I added the reference to "Microsoft
Scripting Runtime." However, in my process, the invalid call/procedure
is being tagged on objFiles(1). It would give me the same error if I
called: Set f = objFiles(1) or Set f = objFiles.Item(1). Dimensioning
objFiles as a generic Object didn't seem to solve this issue.

Any other ideas?


Hello bgetson,

I missed an important argument assigment when looking at the Item
property, It takes a KEY value or in this case the Name of the File to
work. Bit different from a regular Item property for a collection. The
only way to access unknown files in the collection is to use For
Each...Next.

For Each f In MyFiles
Workbook.Open f.Path
Next f

Sincerely,
Leith Ross