Borg
2005-01-07, 07:37 PM
Below is code for click event procedure. By the time I click the button I would
have selected some files in the referenced file list box.
The problem is that I expect strCurrDwgName to return each file name
as it iterates through the list. However it only returns the last file selected
and returns it once for each iteration..
Do I need a different property?
Private Sub cmdDWFIt_Click()
Dim intDwgIndex As Integer
Dim strCurrDwgName As String
For intDwgIndex = 0 To lstDrawings.ListCount - 1
If lstDrawings.Selected(intDwgIndex) = True Then
strCurrDwgName = lstDrawings.FileName
frmMain.Print strCurrDwgName
End If
Next intDwgIndex
End Sub
have selected some files in the referenced file list box.
The problem is that I expect strCurrDwgName to return each file name
as it iterates through the list. However it only returns the last file selected
and returns it once for each iteration..
Do I need a different property?
Private Sub cmdDWFIt_Click()
Dim intDwgIndex As Integer
Dim strCurrDwgName As String
For intDwgIndex = 0 To lstDrawings.ListCount - 1
If lstDrawings.Selected(intDwgIndex) = True Then
strCurrDwgName = lstDrawings.FileName
frmMain.Print strCurrDwgName
End If
Next intDwgIndex
End Sub