Sub CreateDatabase()
' Creates a new Access database and table
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.NewCurrentDatabase "C:\temp\myDatabase.accdb"
accApp.CurrentDb.Execute "CREATE TABLE myTable (ID INT, Name TEXT(50))"
accApp.Quit
End Sub
VBA code to create a new Access database and table
