2011gerry007
Member
I need help with the coding part of autosave to Pdf if any changes occurs on on a worksheet and also to overwrite the newly created existing pdf , I managed to find vba to save save pdf (via WWW-Google)
as below
But can't find a way of executing it via on change or ????"
This workbook is a newly created workbook/sheet each day and is therefore will have a different name each day it is downloaded,
I have tried posting this same question in an other forum, but I have had no response as yet? So, I can only assume that is way to complex a question for the other Forum.
url MrExcel.com
http://www.mrexcel.com/forum/excel-...-worksheet-any-cell-changes-pdf-set-path.html...
Any suggestion will be very much appreciated
▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !
as below
Code:
Sub RDB_Workbook_To_PDF1()
'Stop
Dim filename As String
'///////////////////////////////////////////////
Dim PDF_date As String
PDF_date = Format(Now, "dd-mmm-yy") & "_OV.pdf"
'
'
Application.DisplayAlerts = False '' turn warning messages off.
filename = RDB_Create_PDF(Source:=ActiveWorkbook, _
FixedFilePathName:="P:\?????\Daily?????" & PDF_date, _
OverwriteIfFileExist:=True, _
OpenPDFAfterPublish:=False)
'
'For a fixed file name use this in the FixedFilePathName argument
'FixedFilePathName:="C:\Users\Ron\Test\YourPdfFile.pdf"
'
'
If filename <> "" Then
' 'Ok, you find the PDF where you saved it
' 'You can call the mail macro here if you want
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
Application.DisplayAlerts = True '' turn warning messages on.
End Sub
But can't find a way of executing it via on change or ????"
This workbook is a newly created workbook/sheet each day and is therefore will have a different name each day it is downloaded,
I have tried posting this same question in an other forum, but I have had no response as yet? So, I can only assume that is way to complex a question for the other Forum.
url MrExcel.com
http://www.mrexcel.com/forum/excel-...-worksheet-any-cell-changes-pdf-set-path.html...
Any suggestion will be very much appreciated
▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !