Hi. This question is not only to solve a problem for me, but also to understand some of the VBA logic.
In one of my forms I declare a variable as a class (which I have written myself). After that I set some of it's properties in one of my private functions. However, when trying to retrieve those properties from an another private sub, the property values are gone. Changing the initial function from private to public solves the issue, but that doesn't seem to me as the correct way of handling the issue.
Is there a way to change the properties of a public class variable from within a private function, and have those changes being applied publicly instead of only locally?
Thanks in advance.
In one of my forms I declare a variable as a class (which I have written myself). After that I set some of it's properties in one of my private functions. However, when trying to retrieve those properties from an another private sub, the property values are gone. Changing the initial function from private to public solves the issue, but that doesn't seem to me as the correct way of handling the issue.
Is there a way to change the properties of a public class variable from within a private function, and have those changes being applied publicly instead of only locally?
Thanks in advance.