Access a text file as a database inVBA Follow

0
Avatar
Issam Alkhiami

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?

1 comments

0
Avatar
Jasper Wen
Moderator
Comment actions Permalink

If you haven't already, I strongly suggest looking in our BarTender help, there some good examples and documentation for doing this.

You can find more information here.

Please sign in to leave a comment.