Public Function Controls() as Object
Set Controls=Usercontrol.Controls
End Function
Debug.Print Me.MyControl1.Controls("Label1").Caption
Dim ctl as MySecondControl
Set ctl=me.MyControl1.Controls("MySecondControl1")
Dim lv as ListView
Set lv=Form1.UserControl.Controls("ListView1")
lv.ListItem.Add ,"new key","some text"
set lv=nothing
Public Sub ComboF1(i As Integer)
Form1.Controls("Combo" & i).AddItem "1"
Form1.Controls("Combo" & i).AddItem "2"
…………
End Sub
Public Sub ComboF2(i As Integer)
Form2.Controls("Combo" & i).AddItem "2"
Form2.Controls("Combo" & i).AddItem "3"
…………
End Sub
Private Sub Form_Load()
ComboF1 1
ComboF1 2
……….
Сейчас этот форум просматривают: AhrefsBot и гости: 58