Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to dynamically resize a dynamically frame.

Status
Not open for further replies.

Elena

Technical User
Oct 20, 2000
112
US
In this code, I have a commandbutton array, a textbox array, and a frame array. I am trying to dynamically create them based on a database and then resize them. I can't figure out why this doesn't work. The program fails at the area highlighted below with 'object does not support this property or method' error. Any ideas?


Dim cmdobj As CommandButton
Dim txtobj As TextBox


Load Frame1(1)
With Frame1(1)
.Visible = True
.Caption = "Dynamic Frame"
End With


For i = 1 To 5
Load Command1(i)
Load Text1(i)
With Command1(i)
.Visible = True
Set .Container = Form1!Frame1(1)
.Caption = i
.Top = i * Command1(i).Height
.Left = 200

End With
With Text1(i)
.Visible = True
Set .Container = Form1!Frame1(1)
.Top = i * Command1(i).Height
.Left = 220 + Command1(i).Width

.Text = ""
End With
Frame1(1).Height = 15
For Each txtobj In Form1!Frame1(1)
Frame1(1).Height = txtobj.Height + Frame1(1).Height
Next


Next


Thanks,

Elena
 
I don't believe that the Frame object supports a TextBox collection property or method
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top