I have no idea what this should mean:
"Some sheets would have to be combined into one workbook based on cell C1"
For everything else, look at the code below.
Andreas.
Sub Test()
Dim Ws As Worksheet
Dim Path As String, FName As String, Fullname As String
Dim Exportsheets As New Collection
For Each Ws In Worksheets
Path = Ws.Range("A1")
If Right(Path, 1) <> "\" Then Path = Path & "\"
If Dir(Path, vbDirectory) = "" Then
Select Case MsgBox("Folder '" & Path & "' didn't exist, I skip that sheet", vbOKCancel + vbInformation, Ws.Name)
Case vbOK
GoTo NextSheet
Case vbCancel
'Abort
Exit Sub
End Select
End If
FName = Ws.Range("B1")
Fullname = Path & FName
If Dir(Fullname, vbNormal) <> "" Then
Select Case MsgBox("File '" & Fullname & "' aready exist, can I delete it?", vbYesNoCancel + vbQuestion + vbDefaultButton2, Ws.Name)
Case vbNo
'Skip
GoTo NextSheet
Case vbCancel
'Abort
Exit Sub
End Select
End If
Exportsheets.Add Ws
NextSheet:
Next
Application.EnableEvents = False
Application.DisplayAlerts = False
Application.ScreenUpdating = False
For Each Ws In Exportsheets
Path = Ws.Range("A1")
FName = Ws.Range("B1")
Fullname = Path & FName
Ws.Copy
DoEvents
ActiveWorkbook.Close True, Fullname
Next
Application.EnableEvents = True
End Sub