For n = 4 To Sheets.Count Step 1
MyFileName = Sheets
.Range("A6").Value
MyFileNameTwo = Sheets
.Range("A5").Value
ChDir MyFileName
'Sheets 4,5,6 etc...
Sheets
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=(MyFileNameTwo & ".pdf"), Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
'Application.Goto Sheets(1).Range("A1")
Next n
'
End Sub
The format of MyFileNameTwo isn't saving the file as a PDF and I'm stumped. It's supposed to read xxxxxx#words.pdf but instead is saving it as xxxxxx in a non pdf file. This works on another workbook I have and I don't know why it won't with this one. Any suggestions on to why it wouldn't pull the name fromt he cell correctly? And I've double checked what's in taht cell is correct way.
MyFileName = Sheets
MyFileNameTwo = Sheets
ChDir MyFileName
'Sheets 4,5,6 etc...
Sheets
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
'Application.Goto Sheets(1).Range("A1")
Next n
'
End Sub
The format of MyFileNameTwo isn't saving the file as a PDF and I'm stumped. It's supposed to read xxxxxx#words.pdf but instead is saving it as xxxxxx in a non pdf file. This works on another workbook I have and I don't know why it won't with this one. Any suggestions on to why it wouldn't pull the name fromt he cell correctly? And I've double checked what's in taht cell is correct way.