New Excel user.
I used the code below (found on internet) to create a button that would save the active worksheet as a pdf to the same folder from which the excel file was opened. It worked for a time and then started saving the pdf to a different folder. I cannot determine the reason why it changed or how to fix it...
I used the code below (found on internet) to create a button that would save the active worksheet as a pdf to the same folder from which the excel file was opened. It worked for a time and then started saving the pdf to a different folder. I cannot determine the reason why it changed or how to fix it...
VBA Code:
Sub SaveAsPDF()
Dim File_Name As String
Dim Destination As String
Application.DisplayAlerts = False
Destination = "/Users/skarekroe/Documents/_Documents/_Southern/_MIATC/_Courseware/_Courseware Developement/WorkPages/"
File_Name = Range("AY1").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
filename, Quality:=xlQualityStandard, IncludeDocProperties _
:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub