我在Access数据库中有代码。
Private Sub Text0_Click()
Dim s As String
s = MyGetOpenFileName
Me.Text0.Value = s
End Sub在Windows7Office2010中,当我单击文本框时,窗口会打开。
在Windows 10 Office 2013中,什么都不会发生。
发布于 2017-04-04 14:54:02
我认为这应该行得通:
Dim OpenFile As工作簿
fPath = Application.GetOpenFilename(FileFilter:="Excel files, *.xl; *.xlsx; *.xlsm; *.xlsb; *.xlam; *.xltx; *.xls; *.xlt ", Title:="You can type the title for Your window here")
If fPath = False Then
Exit Sub
End If
Set OpenedFile = Workbooks.Open(fileName:=fPath, UpdateLinks:=0, IgnoreReadOnlyRecommended:=True)我显示了一个窗口,其中包含对excel文件的筛选,然后检查是否选择了文件,如果是,则打开文件。
https://stackoverflow.com/questions/43200126
复制相似问题