View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tomkat743 Tomkat743 is offline
external usenet poster
 
Posts: 48
Default Run time error 13 with new Collection

Type Mismatch

Stops on Line: "For Each itm In Collection" (says no itm no Collection.)

Any thoughts? Please help
Also why does VB put a space between row and column

Dim bkList As New Collection
With Workbooks("1DLSUNDAY.XLS").Worksheets("Master")
Set rng = .Range(.Cells(2, 3), .Cells(2, 3).End(xlDown))
End With

On Error Resume Next
For Each cell In rng
bkList.Add Trim(cell.Text), Trim(cell.Text)
Next
On Error GoTo 0

For Each itm In Collection
Workbooks.Open "C:\Documents and Settings\Tom\Desktop\CHARTER BLANK\NEW
BLANK\" & _
itm & ".xls"
Next