Don Juan Matus
New Member
- Joined
- Mar 13, 2019
- Messages
- 1
Hello,
In fact I need a list of inputboxes:
- first collumn is with fixed numbering
- second and third collumn should behave like inputboxes for values
- I need 20 rows of it
As the listbox-control doesn't allow user input, I thought of creating
the textboxes dynamically in code and assign them to an array.
The following works - despite that no program break is possible there:
Public controlarry(20, 3) As Object
Sub createTxtBoxexs()
dim i%
for i = 1 to 20
Set controlarry(i) = Worksheets("xyz").OLEObjects.Add("Forms.TextBox.1")
end sub
It is sayed, that I need a class and have to use WithEvents.
But the following is a syntax error:
public withevents txtEvents as Forms.TextBox
How can I process the events of the created TextBoxes?
Can you please give an example for it?
In fact I need a list of inputboxes:
- first collumn is with fixed numbering
- second and third collumn should behave like inputboxes for values
- I need 20 rows of it
As the listbox-control doesn't allow user input, I thought of creating
the textboxes dynamically in code and assign them to an array.
The following works - despite that no program break is possible there:
Public controlarry(20, 3) As Object
Sub createTxtBoxexs()
dim i%
for i = 1 to 20
Set controlarry(i) = Worksheets("xyz").OLEObjects.Add("Forms.TextBox.1")
end sub
It is sayed, that I need a class and have to use WithEvents.
But the following is a syntax error:
public withevents txtEvents as Forms.TextBox
How can I process the events of the created TextBoxes?
Can you please give an example for it?