Link to home
Start Free TrialLog in
Avatar of Keith McElroy
Keith McElroy

asked on

creating accdb file from vb script

I am attempting to build an accdb file from vb script and getting the following err.

Screenshot:http://www.screencast.com/t/6zR7qY740X

I intent to run this on machines that do not have Access installed.  I tested on a machine that did have Access 2010 and still get the err.

VB Script:
strFileName = InputBox("Enter Access File Name",, "MyAccessDatabase")

Set objCatalog = CreateObject("ADOX.Catalog")

'objCatalog.Create "PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE =" & strFileName & ".accdb" & ";"


Set objCatalog = Nothing

MsgBox "Done"

How can I overcome the err?
ASKER CERTIFIED SOLUTION
Avatar of Professor J
Professor J

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Keith McElroy
Keith McElroy

ASKER

Yes, it works now, I also downloaded and installed the Microsoft Office Compatability Pack which seemed to help as well.  Thanks a bunch!
you are welcome Max. thanks for the feedback