返回列表 上一主題 發帖

如何可以實現像 excel 的開啟舊檔一樣的檔案類型選擇

如何可以實現像 excel 的開啟舊檔一樣的檔案類型選擇

請問如何設定檔案的類型?
如何可以實現像 excel 的開啟舊檔一樣
可以選擇不同的檔案類型??

以下是我寫的open file 的 code

   
Set Fso = CreateObject("Scripting.FileSystemObject")
        Set Fd = Application.FileDialog(msoFileDialogFilePicker)
        Fd.Title = "Please select a file"
        Select Case Fd.Show
            Case 0
                MsgBox ("You have not select a file")
                add_file = False
                Exit Function
                UserForm.Show
            Case -1
                Fld = Fd.SelectedItems(1)
                add_file = True
        End Select
    Workbook.Open Filename:=Fld, ReadOnly:=True
s

本帖最後由 grostcar 於 2011-3-25 16:20 編輯

是這個了感謝師兄


沒有問題了
謝謝師兄幫忙
s

TOP

        靜思自在 : 能付出愛心就是福,能消除煩惱就是慧。
返回列表 上一主題