Hello
FRUSTRATED...
I am trying to load Access 2013 through my userform in 2013 Excel using VBA.
I have downloaded and tried the following pieces of code..
Many and many different attempts.
Name of my database is... "R:\NewDB.accdb"
most of the code loads Access then it immediately closes down.
I have a master control panel userform that drives my excel file. I want to click on a button and Access loads up.. AND STAYS OPEN. One of the pieces came close except when I closed my userform access followed.
FRUSTRATED...
Scott
FRUSTRATED...
I am trying to load Access 2013 through my userform in 2013 Excel using VBA.
I have downloaded and tried the following pieces of code..
Code:
'Access object
'Dim appAccess As Object
'create new access object
'Set appAccess = CreateObject("Access.Application")
'open the acces project
'Call appAccess.OpenCurrentDatabase("R:\Sample.accdt")
'appAccess.Visible = True
'the path to create the new access database
'Dim strPath As String
'an Access object
'Dim objAccess As Object
'strPath = "R:\NewDB"
'Set objAccess = CreateObject("Access.Application")
'Call objAccess.NewCurrentDatabase(strPath)
'objAccess.Quit
'Access object
'Dim appAccess As Object
'create new access object
'Set appAccess = CreateObject("Access.Application")
'open the acces project
'Call appAccess.OpenCurrentDatabase( _
'"R:\NewDB.accdb")
'appAccess.Visible = True
'Dim db As Access.Application
'Set db = New Access.Application
'db.OpenCurrentDatabase "R:\NewDB.accdb"
'db.Application.Visible = True
'Global oApp As Object
'Sub OpenAccess()
'On Error Resume Next
'Dim LPath As String
'Dim LCategoryID As Long
'Dim DATABASE As String
'Static oApp As Access.Application
'DATABASE = "R:\NewDB.accdb"
'Set oApp = GetObject(, "Access.Application")
'If (Err.Number <> 0) _
' Or (oApp.CurrentDb.Name <> DATABASE) Then
'Set oApp = Nothing
'Set oApp = CreateObject("Access.Application")
'oApp.Visible = True
'oApp.OpenAccessProject "R:\NewDB.accdb"
'Set oApp = CreateObject("Access.Application")
'oApp.Visible = True
'oApp.OpenCurrentDatabase DATABASE
'End If
'Open form called Categories filtering by CategoryID
'LLocation = Range("A2").Value
'oApp.DoCmd.OpenForm "ReviewEBDOrdersFrm", , , "[Circuit]=" & "'" & LLocation & "'"
strdb = "R:\NewDB.accdb"
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
appAccess.OpenCurrentDatabase strdb
appAccess.DoCmd.OpenForm
Set appAccess = Nothing
Name of my database is... "R:\NewDB.accdb"
most of the code loads Access then it immediately closes down.
I have a master control panel userform that drives my excel file. I want to click on a button and Access loads up.. AND STAYS OPEN. One of the pieces came close except when I closed my userform access followed.
FRUSTRATED...
Scott
Last edited by a moderator: