Indentation, formatting and line continuation sure would make it easier to see what is going on,
and to maintain what you have. For example:
Code:
Sub creatingalist()
Dim QuoteID As Variant
Dim i As Integer
i = 1
With Application.FileSearch
Do Until 1 = 1231 ' I presume you mean i = 1231 rather than 1 = 1231 . . .
QuoteID = Workbooks("WorkBook1.xls").Worksheets("Fid Data").Cells(i, 9).Value
.LookIn = Dir("c:\FilePath" & QuoteID)
If .Execute > 0 Then _
Workbooks("WorkBook1.xls").Worksheets("Fid Data").Cells(i, 9).Copy _
Destination:=Workbooks("Fiducuary Submissions.xls").Worksheets("Fid Data").Cells(i, 1)
i = i + 1
Loop
End With
End Sub
Also, I think an easier looping construct would be:
Code:
Sub creatingalist()
Dim QuoteID As Variant
Dim i As Integer
With Application.FileSearch
For i = 1 To 1231
QuoteID = Workbooks("WorkBook1.xls").Worksheets("Fid Data").Cells(i, 9).Value
.LookIn = Dir("c:\FilePath" & QuoteID)
If .Execute > 0 Then _
Workbooks("WorkBook1.xls").Worksheets("Fid Data").Cells(i, 9).Copy _
Destination:=Workbooks("Fiducuary Submissions.xls").Worksheets("Fid Data").Cells(i, 1)
Next i
End With
End Sub
Did you mean to have
Code:
...
.LookIn = Dir("c:\FilePath\" & QuoteID)
...
instead of
Code:
.LookIn = Dir("c:\FilePath" & QuoteID)
...?
What result is it that you are getting?
Does the code raise an error, or just run without generating results?