Office中国论坛/Access中国论坛

标题: 用VB(外部程序)启动ACCESS程序.(有例子) [打印本页]

作者: yangxiang    时间: 2007-4-21 01:03
标题: 用VB(外部程序)启动ACCESS程序.(有例子)
试用以下贴的代码进行生成工程EXE,因未用过vb,请指教一下。

请看:

http://www.office-cn.net/forum.php?mod=viewthread&tid=26776&replyID=&skin=1

http://www.office-cn.net/forum.php?mod=viewthread&tid=21071&replyID=&skin=1

http://www.office-cn.net/forum.php?mod=viewthread&tid=50102&replyID=&skin=1


[此贴子已经被作者于2007-4-24 14:24:45编辑过]


作者: yangxiang    时间: 2007-4-23 17:29
请指教.
作者: yangxiang    时间: 2007-4-24 17:26
试用vb搞的直接运行access程序,请高手搞个完全无启动画面的.

代码:

Private Sub Main()

Dim strAPP As String
Dim strSecuredFileName As String
Dim strAppFileName As String
Dim AccApp As New Access.Application
Dim AccPath As String
AccPath = AccApp.SysCmd(acSysCmdAccessDir)
Set AccApp = Nothing
strAppFileName = App.Path & "\test.mde" & """UNTIME"
strAPP = """" & AccPath & "\msaccess.exe"" """ & _
strAppFileName
Shell strAPP, 3
If Err <> 0 Then
MsgBox Err.Description
End If
End Sub[attach]24104[/attach]

作者: linag516    时间: 2008-6-11 13:49
[:31]




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3