اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

تعديل على احد الأكواد


figo82eg
إذهب إلى أفضل إجابة Solved by jjafferr,

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

ارجو المساعدة  فى التعديل على الكود المرفق حيث اقوم بالضغط على حقل دبل كليك يظهر لدى الملف المحفوظ فى الفولدر المحدد بالكود 

فى نفس مسار البرنامج ( NEW FOLDER  ) ولكن المشكلة أنى أريد عند الضغط دبل كليك يقوم بالبحث فى أكثر من فولدر وليكن أسمه

فهل يوجد تعديل للكود ليبحث فى المسارين فى وقت واحد

 

Private Sub CRN_DblClick(Cancel As Integer)

File_Path = Application.CurrentProject.Path & "\CONTACT\"

File_Path = Application.CurrentProject.Path & "\NEW FOLDER\"

File_Name = Me.crn & ".pdf"
Name_Path = File_Path & File_Name
   
    If Dir(Name_Path) <> "" Then
    Application.FollowHyperlink Name_Path
    Else
        MsgBox "المستندات غير محفوظة"
    End If
End Sub

 

تم تعديل بواسطه jjafferr
وضع الكود بالطريقة الصحيحة بإستخدام <> من القائمة
رابط هذا التعليق
شارك

  • أفضل إجابة

وعليكم السلام 🙂

 

استعمل الكود مرتين:

Private Sub CRN_DblClick(Cancel As Integer)

File_Path = Application.CurrentProject.Path & "\CONTACT\"

File_Name = Me.crn & ".pdf"
Name_Path = File_Path & File_Name
   
    If Dir(Name_Path) <> "" Then
    Application.FollowHyperlink Name_Path
    Else
        MsgBox "المستندات غير محفوظة"
    End If
  

  File_Path = Application.CurrentProject.Path & "\NEW FOLDER\"

File_Name = Me.crn & ".pdf"
Name_Path = File_Path & File_Name
   
    If Dir(Name_Path) <> "" Then
    Application.FollowHyperlink Name_Path
    Else
        MsgBox "المستندات غير محفوظة"
    End If
  
End Sub

 

جعفر

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

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