Hi Pooni
The above code works only when the Access is installed in your machine.
Try the following.
Set a refernce to Microsoft Data Access Objects 3.6 in The Project --> References.
Use the following code
Code:
Dim db As DAO.Database
Dim NewDatabaseFilePath As String
NewDatabaseFilePath = "c:\test.mdb" 'You can give your own path
Set db = CreateDatabase(NewDatabaseFilePath, dbLangGeneral) 'This will create a new test.mdb file
db.Close
Set db = Nothing
ALL THE BEST