Board logo

標題: [發問] 自動開啟excel [打印本頁]

作者: z15935712    時間: 2016-4-16 21:16     標題: 自動開啟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
複製代碼

作者: z15935712    時間: 2016-4-16 21:42

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
複製代碼





歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)