jtrombley24
New Member
- Joined
- Feb 21, 2016
- Messages
- 27
This shouldn't be hard, but it's giving me fits.
This code is working well and I'm creating a collection of textbox controls so that I can detect changes on the userform (to prompt a user to save their work).
I want to EXCLUDE one textbox (that I'm using as a search feature) from the collection so that changes are NOT detected when a user begins typing.
I know this should be easy, but I'm stumped. Thanks in advance!
This code is working well and I'm creating a collection of textbox controls so that I can detect changes on the userform (to prompt a user to save their work).
I want to EXCLUDE one textbox (that I'm using as a search feature) from the collection so that changes are NOT detected when a user begins typing.
I know this should be easy, but I'm stumped. Thanks in advance!
Code:
Set tbCollection = New Collection
For Each ctrl In Me.Controls
If TypeOf ctrl Is MSForms.TextBox Then
Set obj = New ClsFormChanges
Set obj.ControlTB = ctrl
tbCollection.Add obj
End If
Next ctrl
Set obj = Nothing