Q: Extract all label captions
I wish to extraxt all the label captions in a visual basic 5.0 project and put the labels in a Access database or a text file.
Normann Dahle; kda@sysedata.no
A: The way I did it in VB 4 is the following: Private Sub Command1_Click() Dim t%, Control As Control For t% = 0 To Forms.Count - 1 For Each Control In Forms(t%).Controls If TypeOf Control Is Label Then 'do something: save to access or to file 'MsgBox Control.Caption End If Next Control Next t% End Sub This will give you all the label.captions Return