تخطي إلى المحتوى الرئيسي
الدعم
تسجيل الدخول باستخدام حساب Microsoft
تسجيل الدخول أو إنشاء حساب.
مرحباً،
تحديد استخدام حساب مختلف!
لديك حسابات متعددة
اختر الحساب الذي تريد تسجيل الدخول باستخدامه.
الإنجليزية
عذراً. هذه المقالة غير متاحة بلغتك.

Microsoft Office Excel has a limit of 1026 manual horizontal page breaks for a worksheet. In Excel 2007, a limit of manual page breaks is 1023. If you run a macro that attempts to exceed this limit, you may receive the following run-time error message:

Not Enough Memory.

Then, you may receive the following error message:

Run-time error '1004':
Application-defined or object-defined error

With Microsoft Excel 2002, you receive the following error message:

Run-time error '1004':
This action exceeds the number of page breaks you can manually add to a worksheet. A worksheet can contain up to 1026 horizontal page breaks.

Summary

The following Excel Visual Basic for Applications (VBA) macro illustrates how the error might occur.

Sub Test()
Dim oSheet As Worksheet
Set oSheet = ThisWorkbook.Worksheets(1)
For i = 1 To 2000
oSheet.HPageBreaks.Add oSheet.Rows(i + 1) '<- Error when i=1027
Debug.Print i
Next
End Sub

More Information

هل تحتاج إلى مزيد من المساعدة؟

الخروج من الخيارات إضافية؟

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

هل كانت المعلومات مفيدة؟

ما الذي أثّر في تجربتك؟
بالضغط على "إرسال"، سيتم استخدام ملاحظاتك لتحسين منتجات Microsoft وخدماتها. سيتمكن مسؤول تكنولوجيا المعلومات لديك من جمع هذه البيانات. بيان الخصوصية.

نشكرك على ملاحظاتك!

×