- 帖子
- 248
- 主題
- 55
- 精華
- 0
- 積分
- 314
- 點名
- 194
- 作業系統
- XP / WIN7
- 軟體版本
- 2003 / 2007
- 閱讀權限
- 20
- 性別
- 男
- 來自
- Tainan
- 註冊時間
- 2013-10-18
- 最後登錄
- 2026-10-30
             
|
回復 2# GBKEE
請問版主
我是以下方作法開啟多檔- Private Sub add_data_Click()
- Dim fn As String
- Dim Show_File As Object
- Dim file_count As Integer
- Dim SF_name As String
-
- Application.DisplayAlerts = False
-
- fn = ActiveWorkbook.Name
- Set Show_File = Application.FileDialog(msoFileDialogOpen)
-
- With Show_File
- .InitialFileName = ActiveWorkbook.Path & "\*.xls" '指定 xls檔
- .AllowMultiSelect = True
- .Show
- If .SelectedItems.Count > 0 Then
-
- For file_count = 1 To .SelectedItems.Count
- With Workbooks.Open(.SelectedItems(file_count))
-
- Debug.Print "SF(" & file_count & "): " & ActiveWorkbook.Name
- SF_name = ActiveWorkbook.Name
- MCD_add fn, SF_name
- .Close 0
-
- End With
- Next
-
- End If
- End With
複製代碼 請問這樣的作法要如何插入WB.UpdateLinks = xlUpdateLinksNever呢? |
|