LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Open a connection to dbf file

Can someone tell me why I am receiving an "Object Variable Not Set" error
when I get to the line that reads "TableObject.MoveFirst"
(By the way, this is an ACT! 6.0 database I am trying to connect to

Sub GetActData()

Dim objDatabase As Object
Set objDatabase = CreateObject("ACTOLE.DATABASE")
objDatabase.Open "C:\Documents and Settings\MyName\My
Documents\Raj\ibs.dbf"

Dim TableObject As Object
Set TableObject = objDatabase.Contact


TableObject.MoveFirst

Dim strOutput As String
strOutput = TableObject.Data(CF_LastName)

ThisWorkbook.Worksheets("Data").Range("A1") = strOutput

Set TableObject = Nothing
objDatabase.Close
Set objDatabase = Nothing
End Sub


Thank you


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared file keeps losing connection Michelle Excel Discussion (Misc queries) 1 January 9th 10 02:00 PM
Shared file keeps losing connection Michelle Links and Linking in Excel 1 January 9th 10 02:00 PM
always recheck data connection library for latest connection strin FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
How do I set up my ODBC Connection from AS/400 file in Excel 2003 HTIMAPICSAdmin Excel Discussion (Misc queries) 0 June 1st 05 08:13 PM
How do I drop an Open connection in Excel Ajay Garg Excel Programming 0 January 6th 04 01:17 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"