Fixed or static data can't be larger than 64K
Fixed and static data include nonautomatic variables, fixed-length strings, and fixed arrays. This error has the following causes and solutions:
You attempted to allocate more than 64K of module-level data.
Reduce the amount of declared data. Note that although the size limit for module-level data is 64K, module-level variable-length strings and arrays can exceed this limit.
You attempted to allocate more than 64K of static procedure-level data in the module.
Reduce the amount of this type of data declared. Static data from all procedures in a module is limited to a total of 64K (not 64K per procedure). Note that static variable-length strings and arrays can exceed this limit.
The size of a user-defined type exceeds 64K.
Reduce the size of the user-defined type. Generally the size of a user-defined type equals the sum of the sizes specified for its elements. On some platforms there may be padding between the elements to keep them aligned on word boundaries. If you nest one user-defined type in another, the size of the nested type must be included in the size of the new type.
In a procedure, you tried to declare a variable of user-defined type that requires more than 32K. Although the size limit of a variable of user-defined type is 64K at module level, variables of user-defined type in procedures can't exceed 32K. Reduce the size required for the user-defined type, or use a module-level variable.
The size of a fixed-length string declared within a procedure exceeds 65,464. Reduce the length of the fixed-length string. Note that variable-length strings can exceed this limit.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기