jwcolby
jwcolby at colbyconsulting.com
Wed Feb 18 03:57:33 CST 2009
Classes which wrap controls need to expose the control itself to the developer. In order to do this we will build a property which returns the control. For naming consistency we use just Ctl as the name of the property in cases where the class wraps a single control, for example the clsCtlTxt and clsCtlCbo. * Open clsCtlCbo and place the following code directly under mInit() ' 'Expose the control ' Property Get ctl() As ComboBox Set ctl = mctlCbo End Property * Compile and save the class. * Open clsCtlLbl and place the following code directly under mInit() ' 'Expose the control ' Property Get ctl() As Label Set ctl = mlbl End Property * Compile and save the class * Open clsCtlTxt and place the following code directly under mInit() ' 'Expose the control ' Property Get ctl() As TextBox Set ctl = mctlTxt End Property * Compile and save the class. -- John W. Colby www.ColbyConsulting.com