ضع الأكواد بين أقواس الكود لتظهر بشكل منضبط ..
جرب التعديل التالي عله يفي بالغرض
CODE
Sub Test()
Dim msg As VbMsgBoxResult, fn As String, sFolder As String, f As Boolean
msg = MsgBox("Will You Open The PDF File?", vbQuestion + vbYesNoCancel)
If msg = vbCancel Then Exit Sub
If msg = vbYes Then f = True
With ThisWorkbook.Sheets(1)
fn = .Range("F11").Value & " " & .Range("J14").Value
sFolder = ThisWorkbook.Path & "" & [F11]
On Error Resume Next: MkDir sFolder
.Range("print_area").ExportAsFixedFormat Type:=xlTypePDF, Filename:=sFolder & fn, OpenAfterPublish:=f
End With
End Sub