Hi all,

I'm running into a problem when running the following piece of code:

PHP Code: 
ActiveWorkbook.Worksheets(SheetName).ExportAsFixedFormat _
    Type
:=xlTypePDF_
    Filename
:=FilePath Filename_
    Quality
:=xlQualityStandard_
    IncludeDocProperties
:=True_
    IgnorePrintAreas
:=False_
    OpenAfterPublish
:=False 
I'm linking the variable, "FilePath" to a cell on a sheet using:

PHP Code: 
FilePath ActiveWorkbook.Worksheets(CommandSheet).Cells(28
The value it returns is: C:\Users\Harry.Greenwood\Documents\Excel PDFs\

The code executes, but doesn't create a PDF.

When I manually paste the file path in, it works fine however.

Any ideas?