is it correct?

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I want to create a dynamic array of activx controls, so I do:

ThreadsNum = Val(ThreadsEdit.Text)
ReDim Line(ThreadsNum)

For i = 1 To ThreadsNum
Dim WithEvents aLine As EMH323AxLib
Set aLine = New EMH323AxLib.EMH323
Set Line(i) = aLine ' is it correct? is there a shorter way?
'some code here
Next i
 
* (e-mail address removed) (Alex) scripsit:
I want to create a dynamic array of activx controls, so I do:

ThreadsNum = Val(ThreadsEdit.Text)
ReDim Line(ThreadsNum)

For i = 1 To ThreadsNum
Dim WithEvents aLine As EMH323AxLib
Set aLine = New EMH323AxLib.EMH323
Set Line(i) = aLine ' is it correct? is there a shorter way?
'some code here
Next i

Are you talking about VB.NET or VB6? If you are talking about VB6,
please turn to microsoft.public.vb.*.
 
Alex said:
I want to create a dynamic array of activx controls, so I do:

ThreadsNum = Val(ThreadsEdit.Text)
ReDim Line(ThreadsNum)

For i = 1 To ThreadsNum
Dim WithEvents aLine As EMH323AxLib
Set aLine = New EMH323AxLib.EMH323
Set Line(i) = aLine ' is it correct? is there a shorter
way? 'some code here
Next i

This is a VB.NET ("dotnet", see group name) group. Your code looks like VB6
(or older) code and a question for one of the microsoft.public.vb.* groups -
but even there WithEvents does not work at local level.
 
Back
Top