Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50158

[SOLVED] excel run-time error -2147024773 (8007007b)

$
0
0
Hi Guys,

I've got a vba code to save my current sheet as a pdf. All was working well untill i changed the formula in the cell from which the filename is pulled. Now whenever I run the code I get a "excel run-time error -2147024773 (8007007b). Document cannot be saved.". I've provided all the vba and formulas below. Any help would be greatly appreciated. Thanks very much :)

VBA code:
Code:

Application.ScreenUpdating = "false"

Worksheets("PDF").Visible = True

Sheets("PDF").Activate




    ThisFile = Range("J9").Text
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        ThisFile, Quality:= _
        xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
        OpenAfterPublish:=False
       
        Application.ScreenUpdating = "True"
       
       
    ThisWorkbook.Close savechanges:=False

J9 formula previously (worked) =CONCATENATE("P:\Air Import Quotes\",P6," ",P3," ",TEXT(P7,"dd-mm-yy"))
J9 formula now (doesn't work) =CONCATENATE("P:\Air Import Quotes\",P6," ",P3," ",TEXT(P7,"dd-mm-yy")," ",TEXT(P8,"h:mm"))

Viewing all articles
Browse latest Browse all 50158

Trending Articles