문제

I've encountered that in VBA for Excel you can only use CallByName on methods inside class modules, as this link indicates: http://support.microsoft.com/kb/186143 .

My question is why that is? I don't see why the same functionality could not be used outside classes.

I'm not sure if this is a specific VBA question or if the same thing holds for other programming languages.

도움이 되었습니까?

해결책

Application.Run does the job for procedures in non-class modules (documentation).

Why doesn't CallByName work for non-class procedures? It's just not within the scope of that statement.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top