| | |
vb control array
Thread Solved |
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
'used stuffs :- list1 and its two arrays(0,1) 'displaying name along with its index of the selected control Private Sub List1_Click(Index As Integer) MsgBox List1(Index).Name & "(" & Index & ")" End Sub 'dynamically adding items to all listboxes present on the current form Private Sub Form_Load() Dim ctlControl As Object On Error Resume Next For Each ctlControl In Me.Controls If TypeOf ctlControl Is ListBox Then ctlControl.AddItem "computer" DoEvents End If Next ctlControl End Sub
Last edited by Comatose; Jun 8th, 2007 at 2:46 pm.
•
•
•
•
'used stuffs :- list1 and its two arrays(0,1)
'displaying name along with its index of the selected control
Private Sub List1_Click(Index As Integer)
MsgBox List1(Index).Name & "(" & Index & ")"
End Sub
'dynamically adding items to all listboxes present on the current form
Private Sub Form_Load()
Dim ctlControl As Object
On Error Resume Next
For Each ctlControl In Me.Controls
If TypeOf ctlControl Is ListBox Then
ctlControl.AddItem "computer"
DoEvents
End If
Next ctlControl
End Sub
![]() |
Similar Threads
- I am needing a control array, but VB.NET doesn't support them... (VB.NET)
- Simple Array Calculator Help (Visual Basic 4 / 5 / 6)
- Control array (Visual Basic 4 / 5 / 6)
- Passing an Array to multiple ActiveX controls (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Flex Grid error "Invalid procedure call or argument"
- Next Thread: Using VB to compile columns in MS Access
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






