Thread: Automate Access
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hlam hlam is offline
external usenet poster
 
Posts: 4
Default Automate Access

My excel file is to close itself after access is called, however the access
file is not opened in full window size. How can I modify the code in order
to have the access window in full size?

Sub OpenDatabaseFile()

Dim accessApp As Object

Set accessApp = CreateObject("Access.Application.9")

With accessApp
.OpenCurrentDatabase ("D:\db1.mdb")
.Visible = True
End With

Set accessApp = Nothing

ThisWorkbook.Close

End Sub