We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Sub OpenRunTime() Dim accpath As String, dbpath As String On Error Resume Next dbpath = "C:\My Application\MyApp.mdb" Set objAccess = GetObject(dbpath) If Err <> 0 Then If Dir(dbpath) = "" Then 'dbpath is not valid MsgBox "Couldn't find database." Exit Sub Else 'The full version of Microsoft Access is not installed. accpath = "C:\Program Files\Common Files\Microsoft Shared" & _ "\Microsoft Access Runtime\MSAccess.exe" If Dir(accpath) = "" Then MsgBox "Couldn't find Microsoft Access." Exit Sub Else Shell pathname:=accpath & " " & Chr(34) & dbpath & Chr(34), _ windowstyle:=6 Do 'Wait for shelled process to finish Err = 0 Set objAccess = GetObject(dbpath) Loop While Err <> 0 End If End If End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|How can I run a vbs script to all members servers in a domain?||9||25|
|VBScript on Html||15||58|
|IDENTIFY, THEN ADD TOGETHER AND DELETE ONE, EXCEL||3||35|
|vb.net deleting excel sheet in workbook||11||35|