الأربعاء، 06 أكتوبر 2021
  3 الردود
  7.1 ألف زيارة
0
الأصوات
فك
لقد اشتريت للتو Kutools for Excel لأنني كنت أبحث عن خيار لنسخ الحدود في Excel فقط من منطقة محددة - مع ترك المحتوى والتنسيق وعرض العمود من منطقة الوجهة دون تغيير.

لقد وجدت حلاً لهذا - باستخدام Kutools for Excel على صفحة الويب هذه:
https://www.extendoffice.com/documents/excel/4336-excel-copy-borders-only.html#a1 

الآن حاولت استخدام الماكرو المقترح واكتشفت أنه لا يفعل ما وعدت به على الإطلاق:
بالإضافة إلى نسخ الحدود:
- حذف التنسيق من منطقة الوجهة
- يغير عمود منطقة الإرسال
علاوة على ذلك ، يعمل الماكرو ببطء شديد ولا يمكن التراجع عن التغييرات.

هل يمكنك مساعدتي من فضلك للتأكد من أن الماكرو يفعل ما وعد به ....؟

نأمل أن نسمع منك

الافضل
ماريان
منذ سنوات 2
·
#2314
0
الأصوات
فك
مرحبًا MariannevanLubek ،

اسف على المشاكل. هنا قمنا بكتابة ماكرو آخر للقضية. هل يمكنك المحاولة من فضلك؟

Sub CopyBorders()
Dim xRg, yRg As Range
On Error Resume Next

Set xRg = Application.InputBox("Select Range with Borders to Copy...", "Kutools For Excel", , , , , , 8)
Set yRg = Application.InputBox("Select Cells to Apply Borders to range..", "Kutools For Excel", , , , , , 8)

With yRg.Borders(xlEdgeLeft)
.LineStyle = xRg.Borders(xlEdgeLeft).LineStyle
.ColorIndex = xRg.Borders(xlEdgeLeft).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeLeft).TintAndShade
.Weight = xRg.Borders(xlEdgeLeft).Weight
End With
With yRg.Borders(xlEdgeTop)
.LineStyle = xRg.Borders(xlEdgeTop).LineStyle
.ColorIndex = xRg.Borders(xlEdgeTop).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeTop).TintAndShade
.Weight = xRg.Borders(xlEdgeTop).Weight
End With
With yRg.Borders(xlEdgeBottom)
.LineStyle = xRg.Borders(xlEdgeBottom).LineStyle
.ColorIndex = xRg.Borders(xlEdgeBottom).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeBottom).TintAndShade
.Weight = xRg.Borders(xlEdgeBottom).Weight
End With
With yRg.Borders(xlEdgeRight)
.LineStyle = xRg.Borders(xlEdgeRight).LineStyle
.ColorIndex = xRg.Borders(xlEdgeRight).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeRight).TintAndShade
.Weight = xRg.Borders(xlEdgeRight).Weight
End With
With yRg.Borders(xlInsideHorizontal)
.LineStyle = xRg.Borders(xlInsideHorizontal).LineStyle
.ColorIndex = xRg.Borders(xlInsideHorizontal).ColorIndex
.TintAndShade = xRg.Borders(xlInsideHorizontal).TintAndShade
.Weight = xRg.Borders(xlInsideHorizontal).Weight
End With
With yRg.Borders(xlInsideVertical)
.LineStyle = xRg.Borders(xlInsideVertical).LineStyle
.ColorIndex = xRg.Borders(xlInsideVertical).ColorIndex
.TintAndShade = xRg.Borders(xlInsideVertical).TintAndShade
.Weight = xRg.Borders(xlInsideVertical).Weight
End With
End Sub


إذا كانت لديك أي أسئلة أخرى ، فيرجى عدم التردد في إبلاغي بها.

أماندا
منذ سنوات 2
·
#2315
0
الأصوات
فك
مرحبًا MariannevanLubek ،

شيء واحد يجب أن أخبرك به هو أنه بعد تشغيل الكود ، عليك تحديد جميع الخلايا التي تريد تطبيق الحدود فيها ولكن ليس خلية واحدة ، تمامًا مثل لقطة الشاشة أدناه:
حدد الخلايا. png

أماندا
المرفقات (1)
0
الأصوات
فك
شكرًا ، تم حل المشكلة بطريقة أخرى في هذه الأثناء.
  • الصفحة:
  • 1
لا توجد ردود لهذا المنصب حتى الآن.