اذهب الي المحتوي
أوفيسنا

كود حفظ شيت من ملف اكسل حسب اليوم


allaoua10
إذهب إلى أفضل إجابة Solved by a.kawkab,

الردود الموصى بها

بعد تنفيد العملية ستجد النسخة في الفولدر 😄 في مجلد باسم allaoua10  اسمك في المنتدى . الكود معدل حسب الطلب

اظن الكود للاستادنا عبد الله باقشير جزاه الله خيرا وكذلك جميع الاساتدة الكرام

اتمنى ان يكون ما تريد 

تحياتي لك اخي الكريم

 

كود حفظ شيت من ملف اكسل حسب اليوم.xlsm

رابط هذا التعليق
شارك

طالما انك لا تريد رفع الملف

فهذا الخطأ من اعدادات الكمبيوتر لديك فحاول تغيير اسم صفحة التقرير اليومى باللغة الإنجليزية الى مثلا Daily Report وقم بتغييرها ايضا فى الكود وحاول تنفيذ الكود مرة اخرى

يجب ان تكون اسماء الصفحات باللغة الإنجليزية لضمان كفاءة عمل الكود

بارك الله فيك

تم تعديل بواسطه أحمد يوسف
  • Like 1
رابط هذا التعليق
شارك

  • 1 month later...
 
Option Explicit

'The code below are used by the macros in the other two modules
'Do not change the code in the functions in this module

Function RDB_Create_PDF(Source As Object, FixedFilePathName As String, _
                        OverwriteIfFileExist As Boolean, OpenPDFAfterPublish As Boolean) As String
    Dim FileFormatstr As String
    Dim Fname As Variant

    'Test If the Microsoft Add-in is installed
    If Dir(Environ("commonprogramfiles") & "\Microsoft Shared\OFFICE" _
         & Format(Val(Application.Version), "00") & "\EXP_PDF.DLL") <> "" Then

        If FixedFilePathName = "" Then
            'Open the GetSaveAsFilename dialog to enter a file name for the pdf
            FileFormatstr = "PDF Files (*.pdf), *.pdf"
            Fname = Application.GetSaveAsFilename("", filefilter:=FileFormatstr, _
                                                  Title:="Create PDF")

            'If you cancel this dialog Exit the function
            If Fname = False Then Exit Function
        Else
            Fname = FixedFilePathName
        End If

        'If OverwriteIfFileExist = False we test if the PDF
        'already exist in the folder and Exit the function if that is True
        If OverwriteIfFileExist = False Then
            If Dir(Fname) <> "" Then Exit Function
        End If

        'Now the file name is correct we Publish to PDF
        On Error Resume Next
        Source.ExportAsFixedFormat _
                Type:=xlTypePDF, _
                FileName:=Fname, _
                Quality:=xlQualityStandard, _
                IncludeDocProperties:=True, _
                IgnorePrintAreas:=False, _
                OpenAfterPublish:=OpenPDFAfterPublish
        On Error GoTo 0

        'If Publish is Ok the function will return the file name
        If Dir(Fname) <> "" Then RDB_Create_PDF = Fname
    End If
End Function

FunctionsModule.rar

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information