I can get the file to save to a directory I specify, but it looks as though I need to save the workbook to a more specific and variable folder. The book gets saved to a customer folder. That part I've got down, as well as naming the workbook, but I need to the path to go to a more specific file within the customer folder that always changes depending on the part number. The first 2-4 characters change and the remaining characters are x's. All parts with those matching first 2-4 characters are in that specified folder. I'm having trouble using the wildcard function to specify the sub folder inside the customer's folder.
Sub Save_Click()
Dim Customer As String
Dim PartN As String
Dim ExternalLinks As Variant
Dim wb As Workbook
Dim x As Long
Customer = Range("D4").Value
'Save the new workbook
ChDir "T:\Master Print and Inspection Report Files\" & Customer & "\" & "Inspection Reports" & "\"
ActiveWorkbook.SaveAs Filename:= _
"T:\Master Print and Inspection Report Files\" & Customer & "\" & "Inspection Reports" & "\" & Range("D5") & " REV " & Range("G5") & " AS & INSP" & ".xlsm", _
FileFormat:=52, CreateBackup:=False
Set wb = ActiveWorkbook
'Create an Array of all External Links stored in Workbook
ExternalLinks = wb.LinkSources(Type:=xlLinkTypeExcelLinks)
'Loop Through each External Link in ActiveWorkbook and Break it
For x = 1 To UBound(ExternalLinks)
wb.BreakLink Name:=ExternalLinks(x), Type:=xlLinkTypeExcelLinks
Next x
End Sub
Bookmarks