Listbox rowsource type question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I tried using some VB code from another program to use a listbox populated
from data from a dialog box. It's getting caught up in the .List(I) as
Access doesn't recognize this I'm guessing?

option explicit:

Do Until LstXlsFiles.ListCount = 0

For I = Me.LstXlsFiles.ListCount - 1 To 0 Step -1
XlsFile = LstXlsFiles.List(I)
' Transfer tube spreadsheet data.
DoCmd.TransferSpreadsheet acImport, 8, "Temptube", _
TransPath, True, "A1:U350"
LstXlsFiles.RemoveItem (I)
Next I

Loop
 
With Me.LstXlsFiles
For Each varItem In .ItemsSelected
TransPath = .ItemData(varItem)
' Transfer tube spreadsheet data.
DoCmd.TransferSpreadsheet acImport, 8, "Temptube", _
TransPath, True, "A1:U350"
.Selected(varItem) = False
Next varItem
End With
 
Its in a Book????????
Damn, I should have read that book before I spent the time figuring it out
 
Back
Top