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

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

قام بنشر

اريد عند الضغط على زر Border  يتم اضافة بوردرللخلايا التي توجد بها بيانات فقط .
و اريد عند الضغط على زر رقم التسلسل ان يثم اضافة رقم تسلسل لكل اسم بحيت يكون الاسم الاول رقم التسلسلي 1 و الاسم التاني رقم التسلسلي 2 و هكذا الى اخر اسم 

Capture.JPG

has.rar

قام بنشر (معدل)

الاخ الحبيب

جرب المرفق هل هو طلبك

تم عمل زر واحد فقط للسريل والحدود ان شاء الله ينال اعجابك

 

هذا هو الكود المستخدم

Sub hossam()
Columns("A:E").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Dim Lr As Integer
Lr = Cells(Rows.Count, "B").End(xlUp).Row
With Sheets("وقة 2").Range("A3:a100000")
            .ClearContents
End With
[a2] = 1
hh = Application.WorksheetFunction.CountA(Sheets("ورقة 2").Range("b2:b100000"))
If hh > 1 Then
With Sheets("ورقة 2").Range("A3:a" & Lr)
            .Formula = "=sum(A2+1)"
            .Value = .Value
End With
End If
Range("A1:E" & Lr).Select
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlDash
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlDash
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlThin
    End With
End Sub

اللهم اجعلنا ممن يقيم حدودك و لا تجعلنا ممن يضيعها

تقبل تحياتى :fff:

has.zip

تم تعديل بواسطه الصـقـر
  • Like 1

انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد

يجب ان تكون عضوا لدينا لتتمكن من التعليق

انشئ حساب جديد

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

سجل حساب جديد

تسجيل دخول

هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.

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

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

Important Information