Hi,
I have two modules:
Module 2 - where i've defined
Public Sub Workbook_Open(v_fileName As String, MyDir As String)
.....
end
Module 1 - where I will call the procedure defined in Module 2
Sub DirLoop()
Dim MyFile As String, Sep As String
MyDir = InputBox(Prompt:="Enter folder path", _
Title:="Folder Path", Default:="")
If Sep = "\" Then
' Windows platform search syntax.
MyFile = Dir(MyDir & Sep & "*.xlsx")
End If
Do While MyFile <> ""
Workbook_Open(MyDir & Sep & MyFile, MyDir)
MyFile = Dir()
Loop
End Sub
but when executing the module 1 I have a syntax error message. What I'm doing wrong?
Thank You
Bookmarks