Dear Master,
saya mempunyai code vba berikut untuk export file menjadi file baru dengan extensi yang sama *.xlsx.
Yang ingin saya tanyakan yaitu kalau export file baru tersebut ke bentuk PDF bagaimana ?
berikut code vba yang saya pakai :
Private Sub CommandButton15_Click()
Dim MyPath As String
Dim MyFileName As String
Dim MyPath As String
Dim MyFileName As String
Call BukaSemua
MyFileName = "Hasil Pemeriksaan fisik_" & Sheets("fisik").Range("E7").Value & "_" & Format(Date, "ddmmyyyy")
If Not Right(MyFileName, 4) = ".xlsx" Then MyFileName = MyFileName & ".xlsx"
Sheets("fisik").Activate
Sheets("FISIK").Copy
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Select a Folder"
.AllowMultiSelect = False
.InitialFileName = "" '<~~ The start folder path for the file picker.
If .Show <> -1 Then GoTo NextCode
MyPath = .SelectedItems(1) & "\"
End With
NextCode:
With ActiveWorkbook
.SaveAs Filename:=MyPath & MyFileName, CreateBackup:=False
.Close False
End With
End Sub
MyFileName = "Hasil Pemeriksaan fisik_" & Sheets("fisik").Range("E7").Value & "_" & Format(Date, "ddmmyyyy")
If Not Right(MyFileName, 4) = ".xlsx" Then MyFileName = MyFileName & ".xlsx"
Sheets("fisik").Activate
Sheets("FISIK").Copy
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Select a Folder"
.AllowMultiSelect = False
.InitialFileName = "" '<~~ The start folder path for the file picker.
If .Show <> -1 Then GoTo NextCode
MyPath = .SelectedItems(1) & "\"
End With
NextCode:
With ActiveWorkbook
.SaveAs Filename:=MyPath & MyFileName, CreateBackup:=False
.Close False
End With
End Sub
Terima Kasih atas pencerahannya,
Odhy.
Odhy.
__._,_.___
Posted by: Odhy <odhyz83_assasaky@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
:: XL-mania ::::::::::::::::::::
Momods sekarang jualan tas di www.flirtypoodle.com ha ha ha....
:: ------------- ::::::::::::::::::::
DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, pembicaraan pribadi, one line message, melecehkan, tidak sopan.
:: ------------- ::::::::::::::::::::
Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu"
Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu.
:: ------------- ::::::::::::::::::::
Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke
XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari
http://groups.yahoo.com/group/XL-mania/files/Promotion/
:: ------------- ::::::::::::::::::::
Berikan testimoni di :
http://www.xl-mania.com/2008/06/testimoni-xl-mania.html
:: ------------- ::::::::::::::::::::
Message lama ada di :
http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]
http://www.mail-archive.com/xl-mania@yahoogroups.com
Momods sekarang jualan tas di www.flirtypoodle.com ha ha ha....
:: ------------- ::::::::::::::::::::
DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, pembicaraan pribadi, one line message, melecehkan, tidak sopan.
:: ------------- ::::::::::::::::::::
Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu"
Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu.
:: ------------- ::::::::::::::::::::
Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke
XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari
http://groups.yahoo.com/group/XL-mania/files/Promotion/
:: ------------- ::::::::::::::::::::
Berikan testimoni di :
http://www.xl-mania.com/2008/06/testimoni-xl-mania.html
:: ------------- ::::::::::::::::::::
Message lama ada di :
http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]
http://www.mail-archive.com/xl-mania@yahoogroups.com
.
__,_._,___
Nenhum comentário:
Postar um comentário