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

بحث لست بوكس بشرطين ؟


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

اشكرك  😊

لاحظ الصورة

عند البحث عن اسم مثلا  سامر بتاريخ  معين  تم عرض جميع  الاسماء بالتاريخ  المحدد بغض النضر عن اسم سامر  

Capture.PNG.c6203cc5354b7c48dd78704ce1a85cde.PNG

 

 

 

تم تعديل بواسطه alma_fandi
رابط هذا التعليق
شارك

عزيزي @alma_fandi

الكود يعمل بشكل طبيعي عند كتابة اسم المؤسسة في التكست بوكس تظهر المؤسسة المراد البحث عنها

واقترح بان يتم تغيير التكست بوكس إلي كومبو بوكس وتحميل أسماء المؤسسات به حتي يمكن للمستخدم تحديد المؤسسة المرادة دون أي أخطاء إملائية في كتابة اسم المؤسسة

وهذا هو كود تحميل الكومبو بوكس الخاص بالفورمة


    'The Excel workbook and worksheets that contain the data, as well as the range placed on that data
   ' Dim wbBook As Workbook
    Dim WS As Worksheet
    Dim rnData As Range

    'Variant to contain the data to be placed in the combo box.
    Dim vaData As Variant
    'Initialize the Excel objects
    Set WS = ThisWorkbook.Worksheets("sheet1")
    'Set the range equal to the data, and then (temporarily) copy the unique values of that data to the L column.
    With WS
        Set rnData = .Range(.Range("b3"), .Range("b200").End(xlUp))
        rnData.AdvancedFilter Action:=xlFilterCopy, _
                          CopyToRange:=.Range("z1"), _
                          Unique:=True
                'store the unique values in vaData
       vaData = .Range(.Range("z2"), .Range("z200").End(xlUp)).Value
      
    
        'clean up the contents of the temporary data storage
       .Range(.Range("z1"), .Range("z200").End(xlUp)).ClearContents
 
    End With
    'display the unique values in vaData in the combo box already in existence on the worksheet.
    With ComboBox3
        '.Clear
        .List = vaData
        .ListIndex = -1
    End With
   
 

كما اقترح عمل كومبو بوكس أخر يتم إضافة فيه تواريخ أسم المؤسسة المختارة لسهولة الاستخدام

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

13 hours ago, am3h80 said:

عزيزي @alma_fandi

الكود يعمل بشكل طبيعي عند كتابة اسم المؤسسة في التكست بوكس تظهر المؤسسة المراد البحث عنها

صديقي  البحث تمام شغال  مو مختلفين  لكن المطلوب يبحث عن المؤسسات  التي   ضمن تاريخ  محدد

يعني  انا  بدي يبحث  عن المؤسسات  التي  تحتوي  اسم  الما 1 بتاريخ 18-5- 2018

image.png.b55029706ffec781f6c03829dd4e8386.png 

البرنامج  ببحث بكل شي  منفصل  يعني لو خلينا الاسم الما1 وبتاريخ    18-5-2018

بيعطي كل الاسماء  بالاعتماد على التاريخ  فقط

 

Capture.PNG.353252625037ff502c2b85fcb74a39e8.PNG

13 hours ago, am3h80 said:

واقترح بان يتم تغيير التكست بوكس إلي كومبو بوكس وتحميل أسماء المؤسسات به حتي يمكن للمستخدم تحديد المؤسسة المرادة دون أي أخطاء إملائية في كتابة اسم المؤسسة

المؤسسات  اكثر  من  300 الاختيار   بكون ممل



وهذا هو كود تحميل الكومبو بوكس الخاص بالفورمة


    'The Excel workbook and worksheets that contain the data, as well as the range placed on that data
   ' Dim wbBook As Workbook
    Dim WS As Worksheet
    Dim rnData As Range

    'Variant to contain the data to be placed in the combo box.
    Dim vaData As Variant
    'Initialize the Excel objects
    Set WS = ThisWorkbook.Worksheets("sheet1")
    'Set the range equal to the data, and then (temporarily) copy the unique values of that data to the L column.
    With WS
        Set rnData = .Range(.Range("b3"), .Range("b200").End(xlUp))
        rnData.AdvancedFilter Action:=xlFilterCopy, _
                          CopyToRange:=.Range("z1"), _
                          Unique:=True
                'store the unique values in vaData
       vaData = .Range(.Range("z2"), .Range("z200").End(xlUp)).Value
      
    
        'clean up the contents of the temporary data storage
       .Range(.Range("z1"), .Range("z200").End(xlUp)).ClearContents
 
    End With
    'display the unique values in vaData in the combo box already in existence on the worksheet.
    With ComboBox3
        '.Clear
        .List = vaData
        .ListIndex = -1
    End With
   
 

كما اقترح عمل كومبو بوكس أخر يتم إضافة فيه تواريخ أسم المؤسسة المختارة لسهولة الاستخدام

احترامي  سيد  am3h80

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

 

اشكرك سيد

 

am3h80

  ارسلت لك ع ايميل الياهو 

am3h80 @ ياهو  

  شوف اخر تعديل عملته

اذا سمحت  تدخل ع جهازي ونكمل البرنامج سوا بكون جواب مباشر لا  استفسار 

انا بستعمل  teamviwer

Untitled.png.fe4719bc7bb8019e60ceb833d49c8835.png

alma1(Recovered).xlsm

 

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

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