Hi,
How can I find out if a control array is loaded or not?
Example:
I'm drawing textboxes on a form, do all the text formatting as Bold, Italics, Size, etc. Once I had drawn a few I double click the form and the textboxes are then replaced by an array of label controls copying all the formatting of the text to each matching label control in the matching array.
Now, when I go to create somemore textboxes on the form and double click the form I find that the label controls don't appear and the textboxes are still visible.
Here is the procedure I have called from the Form_DoubleClick() event.
Can you please help me find where I'm going wrong?
Thank You,
Andrew.
How can I find out if a control array is loaded or not?
Example:
I'm drawing textboxes on a form, do all the text formatting as Bold, Italics, Size, etc. Once I had drawn a few I double click the form and the textboxes are then replaced by an array of label controls copying all the formatting of the text to each matching label control in the matching array.
Now, when I go to create somemore textboxes on the form and double click the form I find that the label controls don't appear and the textboxes are still visible.
Here is the procedure I have called from the Form_DoubleClick() event.
Code:
Option Explicit
Dim LoadedInx As Integer
Dim Inx As Integer
Sub FinishText()
'
On Error GoTo ArrayErr
LoadedInx = Text1.Count
For Inx = 1 To LoadedInx
Load Label1(Inx)
With Label1(Inx)
.Caption = Text1(Inx).Text
.Font.Name = Text1(Inx).Font.Name
.Font.Bold = Text1(Inx).Font.Bold
.Font.Size = Text1(Inx).Font.Size
.Top = Text1(Inx).Top
.Left = Text1(Inx).Left
.Width = Text1(Inx).Width
.Height = Text1(Inx).Height
.Visible = True
End With
Text1(Inx).Visible = False
Next Inx
'
End Sub
Can you please help me find where I'm going wrong?
Thank You,
Andrew.