View Full Version : Creating access database
Chandrasheka
07-28-2010, 11:45 PM
Hi,
How to create a access database using vba code?
Thanks in advance.
Regards,
Chandra Shekar B
Bob Phillips
07-29-2010, 12:42 AM
#Const EarlyBound = False 'if using early binding
'----------------------------------------------------------------
Sub CreateAccessDatabase(DBPath As String)
'----------------------------------------------------------------
#If EarlyBound Then
Dim oADOCat As ADOX.Catalog
Set oADOCat = New ADOX.Catalog
#Else
Dim oADOCat As Object
Set oADOCat = CreateObject("ADOX.Catalog")
#End If
oADOCat.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & DBPath
Set oADOCat = Nothing
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.