Hi,
as I am new on this Forum, I don't know if my question has already been posted.
If yes, please just show me which post.
I have a collection with n classes (Batch) and I like to change attributes of the items.
These attributes are strings like (Name, Adress, Phone, etc...)
A create a GUI with textboxes where new values can be entered.
Now I like to update the related attribute in the collection items.
ex:
Kind regards
Marco
as I am new on this Forum, I don't know if my question has already been posted.
If yes, please just show me which post.
I have a collection with n classes (Batch) and I like to change attributes of the items.
These attributes are strings like (Name, Adress, Phone, etc...)
A create a GUI with textboxes where new values can be entered.
Now I like to update the related attribute in the collection items.
ex:
Code:
Public collBatches As New Collection ' in UserForm1
Dim BatchData As New Batch
Set BatchData = New Batch
.....
collBatches.Add BatchData ' add batches to collection ....
.....
Dim sCollVarName As String
Dim objCollItem As Object
....
sCollVarName = "Name"
....
sControlName = "UserForm1.collBatches(" & iBatch & ")." & sCollVarName
Set objCollItem = sControlName ' ????????? how is the syntax
objCollItem.Value = tbxTextBox.Value ' like to pass the value entered in the textbox
....
Kind regards
Marco
Last edited by a moderator: