I need to use VBA from Excel to load an Excel workbook in access and transfer it out to a database.
Dim acc As New Access.Application
acc.OpenCurrentDatabase "C:\Test.xls"
I got that far and Excel crashes and has to restart. My plan was to use the following but I can't get that far.
acc.DoCmd.TransferDatabase
Any ideas? I've googled for days and come up with nothing.
*Edit: Thanks for the responses so far
I absolutely have to use Excel VBA, unfortunately. There is an excel spreadsheet that has a bunch of empty columns that are being recognized by the Jet engine as defined columns, too many in fact > 255 (or is it > 256?). I do NOT want to open the Excel worksheet for any reason (this takes far too long over the network). I don't have the option or choice to format it correctly or clean it up. It's easy to convert an XLS spreadsheet into a MDB database inside of access as you all say, but that's not an option. So like I said, I need to use VBA in Excel to manipulate the access object to convert an XLS workbook to an MDB database; Once I have this, the rest will be cake. Thanks so much! I love this site.
mdb" ? - Fionnuala