coba pak Ody:
Private Sub CommandButton15_Click()
Dim MyPath As String
Dim MyFileName As String
MyFileName = "Hasil Pemeriksaan fisik_" & Sheets("fisik").Range("E7").Value
& "_" & Format(Date, "ddmmyyyy") & ".pdf"
ChDir "C:\Documents and Settings\SMP1GEBOG\My Documents\" 'This is
where youo set a defult file path.
fileSaveName = Application.GetSaveAsFilename(MyFileName,
fileFilter:="PDF Files (*.pdf), *.pdf")
If fileSaveName <> False Then
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End If
MsgBox "File Saved to" & " " & fileSaveName
End Sub
2014-07-15 8:55 GMT+07:00 [email protected] [belajar-excel] <
[email protected]>:
>
>
> Pak Odhy,,,
> Mungkin Bisa dilampirkan Filenya biar Be-Exceller yg lain bisa tahu dan
> banyak yang membantu, Juga Bisa dipakai buat belalar kita,
> Coba begini pak buat modul baru masukkan code ini :
> ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF,
> Filename:=Application.ThisWorkbook.Path & "\" & Range("E7").Value,
> Quality:=xlQualityStandard, IncludeDocProperties:=True,
> IgnorePrintAreas:=False, OpenAfterPublish:=True
>
>
>
>
> Thanks,B'Regards
> -Agunk-
>
>
>