Function GetFileName() As String
'引用Microsoft Office 1x.0 Object Library
Set dlgOpen = Application.FileDialog(1)
With dlgOpen
.AllowMultiSelect = False
.Show
End With
If dlgOpen.SelectedItems.Count > 0 Then
GetFileName = dlgOpen.SelectedItems(1)
Else
GetFileName = ""
End If
Set dlgOpen = Nothing
End Function
使用示例:Me![SFile] = GetFileName()
http://www.office-cn.net/vvb/dispbbs.asp?BoardID=2&replyID=184412&id=36741&skin=0
更多帮助信息请参考:Application 对象的FileDialog 属性
[此贴子已经被作者于2006-7-3 20:24:55编辑过]
|