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

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

قام بنشر

وعليكم السلام ورحمة الله وبركاته ..

كفكرة بسيطة ، جرب تعديل هذا الحدث :-

Private Sub ListBox1_Click()

Sheets(ListBox1.Column(0)).Activate
Range(ListBox1.Column(1)).EntireRow.Select
TextBox2.Value = ListBox1.Column(2)

End Sub

 

الى التعديل التالي :-

Private Sub ListBox1_Click()
    If ListBox1.ListIndex = -1 Then Exit Sub
    
    Sheets(ListBox1.Column(0)).Activate
    
    Cells.Interior.Pattern = xlNone
    
    With Range(ListBox1.Column(1))
        .Interior.Color = vbYellow
        .Activate
    End With
    
    TextBox2.Value = ListBox1.Column(2)
End Sub

 

قمت باختيار اللون الأصفر كمثال ، ولك الحرية بالتعديل على مزاجك 

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