Hello Arlette,
With the code I want to get a POP UP where I can selecte multiple files.
From my selection I want the code to copy the first worksheet in the Active Workbook.
(this part does actually work, but with my code mentioned above it picks automatically all files in the folder)
For another sheet I have a code that allows me to select multiple files, but I'm somehow not able to 'merge' those 2 codes.
The Code with the multiple file selection that works is:
Private Declare Function SetCurrentDirectoryA Lib _
"kernel32" (ByVal lpPathName As String) As Long
Sub ChDirNet(szPath As String)
SetCurrentDirectoryA szPath
End Sub
Sub MergeSpecificWorkbooks()
Dim MyPath As String
Dim SourceRcount As Long, FNum As Long
Dim mybook As Workbook, BaseWks As Worksheet
Dim sourceRange As Range, destrange As Range
Dim rnum As Long, CalcMode As Long
Dim SaveDriveDir As String
Dim FName As String
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
SaveDriveDir = CurDir
' Change this to the path\folder location of the files.
ChDirNet "\\Nl-file01\elc-depts\Shared Services\Cash management\Cash forecast\2012 reports\04 April"
FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xl*), *.xl*", _
MultiSelect:=True)
...
Bookmarks