我想在Excel 2016中使用dir函数,但它不起作用:
fPath = "C:\csv"
Application.ScreenUpdating = False
Application.DisplayAlerts = False
fCSV = Dir(fPath & "*.csv")
Do While Len(fCSV) > 0
Set wbCSV = Workbooks.Open(fPath & fCSV)
ActiveSheet.Move After:=wbMST.Sheets(wbMST.Sheets.Count)
fCSV = Dir
Loop
Set wbCSV = Nothing
我存储了c:\csv
个csv文件。
fCSV
始终等于''
任何想法?