hi!
i have managed to get a code which opens all files existing in a folder. now i want to run a macro(Called as donemovementReport) on these files one by one like as it runs on
one i save the file then run on the next one.
The Macro donemovementreport pastes all data from these open sheets to a template. i want to save this tamplate not the opened workbook which carries the actual data.
anybody with some idea?
Sub OpenAllWorkbooks()
Set destWB = ActiveWorkbook
Dim DestCell As Range
FileNames = Application.GetOpenFilename( _
filefilter:="Excel Files (*.csv*),*.csv*", _
Title:="Select the workbooks to load.", MultiSelect:=True)
If IsArray(FileNames) = False Then
If FileNames = False Then
Exit Sub
End If
End If
For n = LBound(FileNames) To UBound(FileNames)
Set wb = Workbooks.Open(fileName:=FileNames(n), ReadOnly:=True)
Next n
'Dim i As Integer
'i = ActiveWorkbook.AcceptAllChanges
'For i = 1 To ActiveWorkbook
Call donemovementReport
'Next i
End Sub
Bookmarks