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

使用VBA代码创建引用

时 间:2012-04-02 15:28:12
作 者:lyxiong   ID:2790  城市:佛山
摘 要:使用VBA代码创建引用
正 文:

Function CreateLibRef(strlibName As String)
  Dim ref As Reference
  On Error GoTo CreateLibRef_Err
   'Create new reference
  Set ref = References.AddFromFile(strlibName)
  CreateLibRef = True
Exit_CreateLibRef:
     Exit Function
CreateLibRef_Err:
   Dim intAnswer As Integer
   Dim strLocation As String
    intAnswer = MsgBox("Library Not Found,Attempt to Locate?", vbYesNo, "Error")
    If intAnswer = vbYes Then
       strLocation = InputBox("Please Enter the Location of the Library")
       Resume
    Else
       CreateLibRef = False
       GoTo Exit_CreateLibRef
     End If
End Function


Access软件网QQ交流群 (群号:483923997)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

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