Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe
For Each itm In bkList "Tomkat743" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks alot I just couldn't see it.
"JMB" wrote: Maybe For Each itm In bkList "Tomkat743" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Collection from Range, tag cells on error | Excel Programming | |||
Can't trap error when checking for keys not in Collection | Excel Programming | |||
Error with passing collection as parameter | Excel Programming | |||
efficiency qn: search collection or use on error? | Excel Programming | |||
Runtime error with the sheet collection, which was not there in 20 | Excel Programming |