Hi All,
I'm creating my own Class in vba for the first time and I was wondering if I can access a method (sub) I've created in a Module from within a class. My idea is to have an Employee class and one of the methods I would like to have for this class is AddNewEmployee. This method will add the new employees details to a table on SQL Server. To do this I need to connect to the server so I have my connection method within a Module. I don't want this in the Employee class as I want to create other classes which will have methods that need to connect to SQL Server. Does anyone know if I can do this?
Thanks in advance
I'm creating my own Class in vba for the first time and I was wondering if I can access a method (sub) I've created in a Module from within a class. My idea is to have an Employee class and one of the methods I would like to have for this class is AddNewEmployee. This method will add the new employees details to a table on SQL Server. To do this I need to connect to the server so I have my connection method within a Module. I don't want this in the Employee class as I want to create other classes which will have methods that need to connect to SQL Server. Does anyone know if I can do this?
Thanks in advance