jondavis1987
Active Member
- Joined
- Dec 31, 2015
- Messages
- 425
- Office Version
- 2019
- Platform
- Windows
Code:
Sub SaveActiveWorksheetAsPDF()
'Saves active worksheet as pdf using concatenation
'of A22,B22,F5
Dim fName As String
With activeWorksheet
fName = Range("'Ag base'!C22").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\jdavis\Dropbox\Quality Control\Aggregates\Recycled Concrete\" & fName, Quality:=xlQualityStandard, _
includeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End With
End Sub
This is the code that I'm currently using to save my file as a pdf when I'm done. Cell B4 in my file has a location's name in it. The location name will be either
Waterloo
Hefner
Stillwater
West
Sunnylane
Norman
For example If it's waterloo I have to move it to from the recycled concrete folder to inside the waterloo folder
C:\Users\jdavis\Dropbox\Quality Control\Aggregates\Recycled Concrete\
C:\Users\jdavis\Dropbox\Quality Control\Aggregates\Recycled Concrete\Waterloo\
I would like it to automatically save to the right folder for all possible outcomes
is there a way to make this happen?