jwcolby54
Member
- Local time
- Today, 18:25
- Joined
- May 19, 2025
- Messages
- 111
It should be mColCtls. Do as I say not as I do. My naming conventions wants to use mColCtls, with the m meaning module level variable (in a class) or fColCtls with the f meaning Form level in a form's class.Page 29
You specify
and thenCode:Private colCtls As Collection
Code:Private Sub Class_Initialize() Set colCtls = New Collection End Sub Private Sub Class_Terminate() Set colCtls = Nothing End Sub
but then use
so the compile balked at mcolCtlsCode:Case acComboBox Dim lclsCtlCbo As clsCtlCbo Set lclsCtlCbo = New clsCtlCbo lclsCtlCbo.mInit ctl mcolCtls.Add lclsCtlCbo, ctl.Name
Changing them all to mcolCtls allows a compile? So which should it be please?
Edit:
You specify this on 37
but have not defined cBackColorFocusCode:Private Sub mctlCbo_GotFocus() mctlCbo.BackColor = cBackColorFocus End Sub
Sorry for the confusion. I have fixed it in the book although TBH I am not even finding where I dim the mColCtls in the explanation in the book.
One of the issues I have to deal with is that as I do things in the book, stuff moves around. Pages shift and so forth.
I think I have found and fixed it in the book. I found it long ago in the database because it wouldn't compile like that.