This thread quickly morphed into more of a Lisp question then a VB(A) one (I'm beginning to think I spent my time answering the wrong question). ...Shall I move this thread to the appropriate forum?
You answered just right, John - its my fault that I tilted the question to what I was exactly trying to do (translate VBA code to LISP).
Still we were inspecting/commenting VBA codes, despite my attempts to write its LISP alternative.
Just to wrap-up in a nutshell the main question/answer + the conclusion I did. :
• Main question:
Is it possible to determine the name of the prog-id, by knowing the library we've accessed from VBAIDE?
• Answer & Discussion:
https://msdn.microsoft.com/en-us/library/aa263181(v=vs.60).aspx
A question appeared though, regarding your first post
From the reference:
"Returns the ProgID (programmatic ID) for the control represented by the VBControl object."
Performed a test:
<code>
If 'AcroApp' do not have this property, Then what are VBControl object(s) ?
Later I found this
But in my module (VBAIDE from Excel) the definition 'VBControl' is not recognised.
Can anyone provide example how to pull-out ProgID property from such object?
> VBControl object
*Pthhh!* I don't remember exactly, but I think that is more generic and has to do with the stuff on your form for example. Like getting a count from a list box object. ...Microsoft's wording is nice isn't it; they give everything a super vague term.
• Conclusion:
The conclusion I did that its not possible to know/pull-out directly the prog-id from the main 'VB Control' object by knowing its library, since this
Progid property doesn't seem to work/exist.
The closest solution is to use a subfunction like
_FindProjIDs to find progids with approximately appropriate names and then check if the expected properties/methods/events (from the library) are allowed.
BTW I don't know if VBAIDE has a tool to list the prog-ids, but I was able to
find a VBA alternative to Michael's subfoo (although I think he probably already has it as VBA aswell [deep in his puckett]).