Sorry again Kokopeli. That will teach me to enter a whole routine in this window instead of testing it in VB first.
The prntCbo function I gave you earlier won't work. Here's a better one.
In your function you use:Code:Private Function PrntCbo(ByVal fIndex As Integer, ByVal eIndex As Integer) Dim BaseLoop As Integer Dim SubLoop As Integer Dim maxCount As Integer Dim strC As String 'Work out what the longest Combo List is maxCount = -1 For BaseLoop = fIndex To eIndex If Combo1(BaseLoop).ListCount > maxCount Then maxCount = Combo1(BaseLoop).ListCount End If Next BaseLoop 'Now build the Printer Strings For BaseLoop = 0 To maxCount - 1 strC = "" For SubLoop = fIndex To eIndex If BaseLoop < Combo1(SubLoop).ListCount Then strC = strC & Combo1(SubLoop).List(BaseLoop) End If strC = strC & vbTab & vbTab Next SubLoop Print strC Next BaseLoop End Function
I've entered this code in VB and it works. Please try it.Code:Private Sub cmdPrint_Click() Dim x As Integer Do Until x = Text1().Count Print Text1(x).Text; vbTab; vbTab; x = x + 1 Loop Print PrntCbo 0,2 End Sub




Reply With Quote