How do I open a .DBF file to a tab in my worksheet?

Tags:
Database
DBF file
I need a macro that will open a .DBF file to a tab in my worksheet. Is this possible? If so, can you show me the code needed and if not would you have any alternative suggestions? Thank you
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Sub ABC()
Dim r1 as Range, r as Range, bk as Workbook
set r1 = Activesheet.range(“A1”)
set bk = workbooks.open(“C:\Myfolder\Myfile.dbf”)
set r = bk.worksheets(1).Range(“A1”).currentRegion
r.copy r1
bk.close SaveChanges:=False
end sub

That is the way I have been doing it successfully in xl2003 and earlier for years. Support for Saving as DBF was dropped in xl2007 for sure but I believe it can still read a dbf file. 
And more use: DBF Restore Toolbox fo restore your files simple, link here:http://www.dbf.restoretools.com/

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: