Here's a piece of vbs code that creates an Access database.
option explicit
dim accessFile
dim acc
dim fso
accessFile = "c:\users\rene.nyffenegger\documents\tq84.accdb"
set fso = createObject("Scripting.FileSystemObject")
if fso.fileExists(accessFile) then
fso.deleteFile(accessFile)
end if
set acc = createObject("Access.Application")
acc.newCurrentDatabase accessFile, 0
acc.visible = True
When started on the command line (u:\> createDB.vbs), the Access database is created. Yet, when the script exits the Access application is closed as well. I'd rather have the application stay open after creation. Is this somehow possible?