Following is a sample from PB Help file (DIR$ function) I just tested:
Error message:
Data type mismatch
Line 4: temp = Dir$("*.*", To Listing(x)
Code:
Dim Listing(1 To 1000) As String Dim x As Long Dim temp As String temp = Dir$("*.*", To Listing(x) While Len(temp) And x < 1000 Incr x temp = Dir$(Next, To Listing(x)) Wend
Data type mismatch
Line 4: temp = Dir$("*.*", To Listing(x)
Comment