String Constants in ActiveX Projects
Can anybody tell me how could one expose string constants from an ActiveX DLL Projects. The reason I want to do this is that some File name or Table name that are frequently used through the ActiveX DLL should be available to the user (or the client app).
One way to do this is through Read-Only Property in a Global Multiuse class. But this is not the right way of implementing this. So the only option is to declare the String Constant in one of the Standard Modules and Expose them through the Type Library.
But the problem is HOW DO I EXPOSE THE STANDARD MODULES FROM AN ACTIVEX DLL OR EXE :confused: :confused: :confused: :confused:
Only Hard-core programmers would be able to answer this quesion and I am sure one is out there. :)
There are lots and lots of other such quieries which requires an indepth knowledge of programming in VB, but I want to start with this one.
axion_sa did not understood the problem
Go through the posted message thoroughly, it seems you did not understand what's the requirement.
Explanation of the above problem with an example .....
Everybody must have used vbCrLf to introduce a line feed in the string to be displayed.
Where does this vbCrLf come from, obviously from one of the 3 VB standard library. I don't remember at present but it is defined in VBA. Where ever it may it is easy to find through the object browser. Find it and you will notice that it comming from a Standard Module and not from a Class.
What axion_sa has mentioned is a Public String Property that is available only through the object of that particular class. He is correct if the requirement is that you want a public string property for an object.
But here what I want is that the string should not be part of any object (i.e., class) but should be avialable Globally like vbCrLf is avialable globally.
For this one needs a Standard module to be exposed from the ActiveX project. But the Standard module is public only within the ActiveX project and not out side. So how could one expose Standard modules from an ActiveX project. If one could do that he/she can expose a public string constant from the ActiveX project to other client app.