I really have a BIG problem in making control arrays.
The following is what i fed to the PC
dim Sam(n) as textbox
for n=1 to 15
It won't work.
Yuo can not create a control just like that. You have to set the control to something. That is the error that you are getting.
This will do the trick:
Dim sam(15) As TextBox
For i = 1 To 15
Set sam(i) = Controls.Add("vb.TextBox", "sam" & i)
sam(i).Visible = True
sam(i).Text = sam(i).Name
sam(i).DragMode = 0
If i <> 1 Then
sam(i).Left = sam(i - 1).Left + sam(i - 1).Width
the last part of the code is so they don't overlap and you can see them all next to each other.
You could also use load... which works just as well. Start a new project, and add a textbox... leave it's name alone (Text1). In The Properties Box, change index to 0. Now, in your form load (or in a button) add this:
For I = 0 To 9
If I <> 0 Then
Text1(I).Top = Text1(I - 1).Top + Text1(I - 1).Height
Text1(I).Visible = True
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...