返回列表 上一主題 發帖

[發問] 自動開啟excel

[發問] 自動開啟excel

Hi All

不知道程式哪邊有問題,無法自動開啟指定路徑下的所有excel
請幫忙檢視看看
  1.     Dim strNowPath As String     
  2.    
  3.     strNowPath = Range("b1")   
  4.       
  5. Dim mFile As String
  6. mFile = Dir("strNowPath & *.CSV")
  7. Do While mFile <> ""
  8. Workbooks.Open Filename:="strNowPath" & mFile
  9. mFile = Dir()
  10. Loop
複製代碼

Hi All

感謝各位的幫忙,小的找到方法了,感恩
  1.     Dim strNowPath As String  
  2.    
  3.     strNowPath = Range("b1")  
  4.    
  5. Dim mFile As String
  6. mFile = Dir(strNowPath & "*.CSV")
  7. Do While mFile <> ""
  8. Workbooks.Open Filename:=strNowPath & mFile
  9. mFile = Dir()
  10. Loop
複製代碼

TOP

        靜思自在 : 唯其尊重自己的人,才更勇於縮小自己。
返回列表 上一主題