Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > Access数据库-模块/函数/VBA

标准文件对话框

时 间:2004-11-19 00:00:00
作 者:黄海   ID:32  城市:苏州
摘 要:标准文件对话框
正 文:


'例: CommonFileOpenSave(, , "所有文件(*.*)" & Chr(0) & "*.*" & Chr(0))
Option Compare Database
Option Explicit
Type tagOPENFILENAME
    lStructSize    As Long
    hwndOwner  As Long
    hInstance  As Long
    strFilter  As String
    strCustomFilter As String
    nMaxCustFilter As Long
    nFilterIndex As Long
    strFile    As String
    nMaxFile   As Long
    strFileTitle As String
    nMaxFileTitle As Long
    strInitialDir As String
    strTitle   As String
    flags      As Long
    nFileOffset As Integer
    nFileExtension As Integer
    strDefExt  As String
    lCustData  As Long
    lpfnHook   As Long
    lpTemplateName As String
End Type
Private Declare Function apiGetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (ofn As tagOPENFILENAME) As Boolean
Private Declare Function apiGetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (ofn As tagOPENFILENAME) As Boolean
Public Function CommonFileOpenSave( _
                                   Optional ByRef flags As Variant, _
                                   Optional ByVal InitialDir As Variant, _
                                   Optional ByVal Filter As Variant, _
                                   Optional ByVal FilterIndex As Variant, _
                                   Optional ByVal DefaultExt As Variant, _
                                   Optional ByVal Filename As Variant, _
                                   Optional ByVal DialogTitle As Variant, _
                                   Optional ByVal hwnd As Variant, _
                                   Optional ByVal OpenFile As Variant) As Variant

Dim ofn        As tagOPENFILENAME
Dim strFilename As

Access软件网官方交流QQ群 (群号:54525238)       Access源码网店


常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助