Results 1 to 2 of 2

Vba save as pdf code problem in code any help please ?

Threaded View

tytyseka Vba save as pdf code problem... 02-11-2015, 10:17 PM
Blokeman Re: Vba save as pdf code ... 02-11-2015, 11:33 PM
  1. #1
    Registered User
    Join Date
    09-01-2014
    Location
    Egypt
    MS-Off Ver
    2013
    Posts
    1

    Vba save as pdf code problem in code any help please ?

    Dears i write the code with many ways but each time give me the error in picture at attachment so could you please help me to know where is the problem to fix it give me error for this there line
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
    Quality:=xlQualityStandard, IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, OpenAfterPublish:=True[/COLOR]


    here is the code

    Sub Nextinvoice()
    Range("c1").Value = Range("c1").Value + 1

    Range("b18:C167").ClearContents
    Range("D18").Select

    End Sub

    Sub GermanysewingordersaveAsPDF()

    ActiveSheet.Protect Password:="123456", DrawingObjects:=True, _
    Contents:=True, Scenarios:=True, AllowFiltering:=True, _
    userinterfaceonly:=True
    Range("D18").Select
    Selection.AutoFilterAttachment 376782
    ActiveSheet.Range("$B$18:$V$167").AutoFilter Field:=3, Criteria1:="<>"
    NewFN = "D:\OFFICE\P-ORDER\Germany order\KNITING GER ORDER\" & Range("D2").Value & ".pdf"
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
    Quality:=xlQualityStandard, IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, OpenAfterPublish:=True[/COLOR]

    Nextinvoice
    Selection.AutoFilter
    Sheets("Groz-Beckert order kNITING").Select
    ActiveWorkbook.save

    ActiveWorkbook.save
    Sheets("Groz-Beckert order kNITING").Select
    ActiveWorkbook.save
    End Sub
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA code to save current worksheet as temporary PDF file and then add to my existing code
    By brianfromla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-20-2014, 08:35 AM
  2. Save as Code problem?
    By schallabrak in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-10-2012, 08:14 AM
  3. Save As code problem.
    By Pedro1803 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2011, 10:35 AM
  4. [SOLVED] Problem with save some code
    By ole_ in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1