Help with error "3170" couldn't find installable ISAM

S

SG

Hi,

I developed a word template which has a combobox for user to choose reasons from the combox1. The value of reasons are from an excel file (letterreasons.xls).
Below is the code that I'm having problem with, once user who is using windows xp opens it, an error message box pops up "run time error 3170, couldn't find installable ISAM". I reinstalled the office xp suite, didn't help. It works fine at windows 2000 pro.

Private Sub Document_New()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim NoOfRecords As Long
Application.AutomationSecurity = msoAutomationSecurityLow

' Open the database
Set db = OpenDatabase("H:\Templates\letterreasons.xls", False, False, "Excel 8.0")

If you need more information, please let me know.

Thanks in advance,
Sarah
 
H

Helmut Weber

Hi Sarah,

this one worked for me (Word 2002, Windows 2000):

regsvr32 msexcl40.dll

Maybe you need a different version of the dll.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
S

SG

Hi Helmut,

Thanks for your quick response. I tried this, it didn't work neither.
Strange is that it was working fine and nobody changed program, all of
sudden it happened.
If you think of any other possibilities, I would like to know.

Thanks so much,
sarah
 
D

David Sisson

Well I solved my problem. I had copied the code from the web and it
had "Excel 9.0". I have WP2000 which requires "Excel 8.0".

The purpose of my exercise was to search an Excel range, looking for
one record (Part Number) and returning the Description from the cell
next to it.

After getting past the first error, I keep getting 'Syntax error
(missing operator) in query expression'.

After searching though some Access message boards, I discovered I had
to put the filter string (MyPartNum) in single quotes.

Sub TestGetDesc()
Call GetDesc("Widget1", "")
End Sub

Sub GetDesc(MyPartNum, MyDesc As String)

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim NoOfRecords As Long
Dim SQLText As String

SQLText = "SELECT PART_NO, DESC FROM `MyInvRng`" _
& "WHERE PART_NO = '" & MyPartNum & '"
'MyPartNum is enclosed with double quote followed by a single quote

' Open the database
Set db = OpenDatabase("C:\My Documents\MyInv.xls", False, False, "Excel
8.0")
' Retrieve the recordset
Set rs = db.OpenRecordset(SQLText)

' Determine the number of retrieved records
With rs
.MoveLast
NoOfRecords = .RecordCount
.MoveFirst
End With

'MsgBox (rs.RecordCount & vbCr & rs!PART_NO & " " & rs!Desc)

MyDesc = rs!Desc

'MsgBox (MyDesc)

' Cleanup
rs.Close
db.Close

Set rs = Nothing
Set db = Nothing

End Sub
 
S

SG

Hi David,

I have the same code as you have now. The code works fine on some of the
PCs, that is strange. I cannot pass the first run time error even on my own
pc. It really bothers me. I tried a couple of solutions which were found on
the web, they didn't help. It happened lately like you said. I wonder if
something to do with windows update.
Can you tell me how you passed the first error?

Thanks,
Sarah
 
S

SG

Hi David,

I fixed mine by changing the code to use ADO instead of DAO. Isn't that
strange?
Thanks for your help.
Sarah
 
S

SG

no, I removed DAO reference and use Active X..2.0 library. It works for me
now.

Sarah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top