Aarvee
Well-known member
Hi ! I need some help in the above subject.I have a Winforms application in which there is a Module which declares some variables as Public. In any of the forms in the project, I am able to access these variables without specifically passing the same to the form. Also in any of the functions in the module, the same are visible without passing them as parameter.Now I have also written a class module and compiled it as DLL in which these public variables are referred to. I have put Option Explicit Off in the class module and compiled the same. Another input is the functions in the DLL are Public shared.When I add the reference of this DLL into my project and call any of the functions in the DLL, the values of all the public variables referred to becomes "nothing" even though in the calling project they do have values.I do not know whether there is any error in my approach. To overcome this, currently I pass all the relevant public variables to the functions in the DLL. With this workaround I am not having any problem. But I would like to know whether there is a simpler and more elegant way of doing this.Thanks for the help.Varadarajan R