Hi all, I am new in this forum.
I have the same problem with runtime error 438.
Last week every things worked good, instead this week has apprared the error's popup.
Also, I have another routine that works well with the same specific....I don't know why
However I am posting code to ask you a solution
Sub ProcessFiles() Dim Filename, Pathname As String
Dim wb As Workbook
Pathname = "C:\Users\tecnico2\Desktop\revisione prova\"
Filename = Dir(Pathname & "*.xlsm")
Do While Filename <> ""
Set wb = Workbooks.Open(Pathname & Filename)
DoWork wb
wb.Save
wb.Quit '<-------------- the error appears here-----------
Filename = Dir()
Loop
End Sub
Sub DoWork(wb As Workbook)
With wb
Call AddDBFasi
End With
End Sub