Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top