Import .csv files from directory

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

Guest

Hi All,

I've pasted the codes from http://allenbrowne.com/ser-59.html into a module
and created a form with a listbox. In the on Open event of the form I have
the following code:

Private Sub Form_Open(Cancel As Integer)

Call ListFiles("g:\user\contracts\Data_files", "*.csv", ,
Me.lstFileList)

End Sub


However, I am getting a datatype mismatch error. Can someone tell me why?

Also, the example says to place the above code in the On Load event but the
sub is for the On Open event. Which is it?

Thanks!
 
What version of Access are you using? Have you compiled the code? If so does
it give and error message - I know in A2k you get error on AddItem which
needs ' out and prevents the listbox listing option.

TonyT..
 
Back
Top