Function marked as restricted or uses a type not supported in Visual Basic
Not every procedure that appears in a type library or object library can be accessed by every programming language. The creator of a type or object library can designate some functions as restricted to prevent their use by macro languages. This error has the following causes and solutions:
You tried to use a function with a restricted specification. You can't use the function in your program. If you have documentation for the object represented by the library, check to see if a method is provided that gives equivalent functionality.
You tried to use a function that requires a parameter type or has a return type that isn't available in Visual Basic.
Sometimes you can simulate return types with Visual Basic equivalents. Check the subtypes of the Variant data type . This may also work for non-Basic parameter types that are expected as references. However, you can't pass a Variant data typeby value in an effort to simulate a non-Basic type.
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 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기