I want to save a weekly generated report to a shared drive using a cell reference as the file name
The following code keeps tripping up at the 'Export as PDF line. Can anyone help please.
Please Login or Register to view this content.
I want to save a weekly generated report to a shared drive using a cell reference as the file name
The following code keeps tripping up at the 'Export as PDF line. Can anyone help please.
Please Login or Register to view this content.
you need to attach a workbook for us to see more easily. i suspect that the value in A5 is not what you think it is, or it is not on the active sheet, or you need to add a filetype when saving
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=fPath & fName &".pdf" , _
might work
try puting the below lines in the code before export as pdf
does it give you what you would expect
Please Login or Register to view this content.
How is it 'tripping up'?
Are you getting errors?
If posting code please use code tags, see here.
Sorry don't know how to attach my file.
The value in A5 was linked to another cell. I've changed this so A5 is now purely text.
I've tried your suggestion but it trips over in the same place.
The code I was using previously works fine. This defined a report name to include the date of the day it is pdf'd. However what we want it to do is give it a name that relates to the data that is in the report (i.e. the text in A5)
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks