I have wrote a VBA macro and in the macro I use visual basic functions such as "RTRIM$( )" and "STR$( )". When running the macro on a client's computer the error "Compile error Can't find project or library" comes up and it stops at the "Rtrim$( )" function.
What is missing on the client's computer.
Please help
Thanks
Paul Seo

VBA Word Can't find project or library
jiggs
RTrim is in the VBA library
C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL
You could get the client to check there references. Within the VBE use Tools > References missing entries will be displayed at the top of the list.
SJROOKER
Ossie Bucko
Techquest
Hi Andy
The codes are as follows.
The error is on the last line, the put command.
Thanks for your help
regards
Paul Seo
Type CLIENTRECTYPE
CN As String * 60 ' Client name
CA1 As String * 40 ' Address line 1
CA2 As String * 40 ' 2
CA3 As String * 40 ' 3
CPC As String * 10 ' Post code
CPH As String * 20 ' Home phone number
End Type
Global CLIENTREC As CLIENTRECTYPE
Global RECNO as double
CLIENTS="C:\data\CLIENTFILE.RAN"
FCLNT = 19
Open CLIENTS For Random Access Read Write Shared As FCLNT Len = 210
Get FCLNT, RECNO, CLIENTREC
CLIENTREC.CA1 = Txt_Document_Client_Address.Text
CLIENTREC.CA2 = Txt_Document_Client_Address2.Text
CLIENTREC.CA3 = Txt_Document_Client_Address3.Text
Put FCLNT, RECNO, CLIENTREC
Luis Esteban Valencia MCP.
Thank you Andy. That definitely fixed the problem.
Most of the macro works except for when I tried to write to a random access file, it comes out with "Run Time Error '59' Bad Record Length". The codes are quite simple, I read the record then set some string fields to the new string value and write it back immediately. The read is fine. The error happens when I am writing it back. I only get this error on the client's computer. It works perfectly on my development computer.
Please help
Thanks you