Access a text file as a database inVBA 关注
I am trying to connect to a text file through vba.
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
Dim btObject As BarTender.DesignObject
Dim btDb As BarTender.Database
Set btApp = New BarTender.Application
btApp.Visible = True
Set btFormat = btApp.Formats.Open("i:\templates\automation_test.btw", False, "")
'Select the database
btDb = btFormat.Databases.GetDatabase("i:\templates\aaa.csv")
I get error message "Can't find database "i:\templates\aaa.csv" .
Any help on what I might be doing wrong?