有人請幫助我 「使用VB 6.0代碼和 在目錄中搜索文件(使用任何擴展名),如果在指定目錄中找到所需文件,代碼應返回TRUE FALSE」使用vb 6.0在一個目錄中查找文件
感謝
Private Function CheckPath (strPath As String) As Boolean
If Dir$(strPath) <> "" Then
CheckPath = True
Else
CheckPath = False
End If
End Function
我想我的問題可能已被誤解了follwing代碼已被嘗試。請檢查一致。由於專用功能的CheckPath(strPath的作爲字符串)作爲布爾 如果DIR $(strPath中)<> 「」 那 的CheckPath =真 否則 的CheckPath =假 結束如果 端功能 –