Run Time Error, help!
Posted by RoB on October 08, 2001 9:44 AM
I posted about this problem 630.html, but never got it resolved.
I'm getting the error "Run-Time error '1004': Select Method of Range class failed".
This is my code:
Dim myFile As String, myCurrFile As String
myCurrFile = ThisWorkbook.Name
myFile = Dir("S:\FileServer\Excel\Save FILES In Here\YEAR 2001\01-01\Cathy\*.xls")
Do Until myFile = ""
Workbooks.Open "S:\FileServer\Excel\Save FILES In Here\YEAR 2001\01-01\Cathy\" & myFile
.Offset(1, 0).Value = Workbooks(myFile).Worksheets("Application").Range("AI4").Value
myFile = Dir
it says the problem is with the bold part. I have tried using .value and .formula for the formula part, and also .select and .activate to select the cell, but I'm still getting the error.
Can anyone help me? Thanks