-
[VBA]
Private Sub combo1_Click()
For j = form1.Label1().Count - 1 To 1 Step -1
Unload form1.Label1(form1.Label1().Count - 1)
Label1(0).Visible = False
Next j
For i = 0 To 10
If i <> 0 Then
Load Label1(i)
Label1(i).Left = 120
Label1(i).Move Label1(i).Left, Label1(i - 1).Top + 400
Label1(i).Visible = True
Load Combo1(i)
Combo1(i).Left = 1920
Combo1(i).Move Combo1(i).Left, Combo1(i - 1).Top + 400
Combo1(i).Visible = True
End If
Next i
end sub
[/VBA]
If I execute the above code I got the following error
"Unable to unload within this context"
I know that is a vb error. It is not possible to unload anything on combo box click event. But I have to load combo boxes and labels at runtime and unload them
Please help me to achieve it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules