PC Review


Reply
Thread Tools Rate Thread

Compile error [Chr(13)]

 
 
Hennie Neuhoff
Guest
Posts: n/a
 
      28th Nov 2008
Hi Guys
My workbook was sent to a remote computer. The code on the remote
computer works fine untill there's a Chr(13) in the code [of which there
are many]. It display the following:
"Compile error can't find project library"

I can't explain this to the user as it's working fine on my side.
Could it be some setting on his computer ??
Any pointers would be appreciated
Ex. Of code:
If Range("SpinsOnAf").Value > 3 Then
MsgBox "Daar is nou reeds " & Val(Range("SpinsOnaf")) _
& " onafgehandelde Spuitinstruksies" & Chr(13) _
& "Dis onaanvaarbaar hoog, jy moet 'n plan maak" & Chr(13) _
& "Jou rekords raak uiters onakkuraat", vbCritical

--
HJN
 
Reply With Quote
 
 
 
 
ProfessionalExcel.com
Guest
Posts: n/a
 
      28th Nov 2008
Sounds like your user has a missing library, nothing to do with your code.

Get them to compile the project, then go to Tools > References and in the
list of checked libraries, see if any of them start with the text "MISSING".
If so, this is your problem. Hopefully it'll just be a library versioning
issue; If so, get them to:

1) uncheck the 'Missing' Library reference
2) close the references window
3) re-open the references window and search for the same library name that
was missing and check it
4) Recompile and run

If you didn't find any library starting with the text "MISSING", sometimes
just compiling the project won't show this up. Try running the code until you
see the error, then end the code and check the references again.

If again, no libraries appear to be missing, check that all the libraries
that are checked, actually exist on the location specified in the window when
you select each library.

Hope that helps!

Please rate this post if it proved useful.

Thanks,
Chris
www.ProfessionalExcel.com

"Hennie Neuhoff" wrote:

> Hi Guys
> My workbook was sent to a remote computer. The code on the remote
> computer works fine untill there's a Chr(13) in the code [of which there
> are many]. It display the following:
> "Compile error can't find project library"
>
> I can't explain this to the user as it's working fine on my side.
> Could it be some setting on his computer ??
> Any pointers would be appreciated
> Ex. Of code:
> If Range("SpinsOnAf").Value > 3 Then
> MsgBox "Daar is nou reeds " & Val(Range("SpinsOnaf")) _
> & " onafgehandelde Spuitinstruksies" & Chr(13) _
> & "Dis onaanvaarbaar hoog, jy moet 'n plan maak" & Chr(13) _
> & "Jou rekords raak uiters onakkuraat", vbCritical
>
> --
> HJN

 
Reply With Quote
 
RadarEye
Guest
Posts: n/a
 
      28th Nov 2008
Hallo Hennie,

What you can try is replace all
Chr(13)
with
vbCrLf
or
vbNewLine

HTH,
Wouter.
 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      28th Nov 2008
That could be the reason but much more likely as already suggested, a
missing reference and/or due to the project having been compiled in a newer
version of Excel than that of the user. Functions from the VBA Strings and
DateTime libraries are particularly susceptible in this scenario.

First thing to do is check tools/references for anything marked as MISSING.
Even if that does not fix there are other things to do before repairing
Office.

Regards,
Peter T


"Bob Flanagan" <(E-Mail Removed)> wrote in message
news:HIOdnX4-(E-Mail Removed)...
> Hennie, most likely the user has a problem with his installation of
> Office. Depending on the verison the steps are slightly different. You can
> find the steps to the cure at
> http://www.add-ins.com/how_to_repair_office.htm
>
> Robert Flanagan
> http://www.add-ins.com
> Productivity add-ins and downloadable books on VB macros for Excel
>
> "Hennie Neuhoff" <(E-Mail Removed)> wrote in
> message news:67FDE5DA-9A16-4D56-86C9-(E-Mail Removed)...
>> Hi Guys
>> My workbook was sent to a remote computer. The code on the remote
>> computer works fine untill there's a Chr(13) in the code [of which there
>> are many]. It display the following:
>> "Compile error can't find project library"
>>
>> I can't explain this to the user as it's working fine on my side.
>> Could it be some setting on his computer ??
>> Any pointers would be appreciated
>> Ex. Of code:
>> If Range("SpinsOnAf").Value > 3 Then
>> MsgBox "Daar is nou reeds " & Val(Range("SpinsOnaf")) _
>> & " onafgehandelde Spuitinstruksies" & Chr(13) _
>> & "Dis onaanvaarbaar hoog, jy moet 'n plan maak" & Chr(13) _
>> & "Jou rekords raak uiters onakkuraat", vbCritical
>>
>> --
>> HJN

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export report to Excel, Error message "Compile Error: Argument not mc Microsoft Access External Data 0 16th Jul 2009 09:11 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Microsoft Excel Programming 1 13th Dec 2005 07:17 PM
Compile error. in table-level validation expression. (Error 3320) =?Utf-8?B?RG9ubmE=?= Microsoft Access Forms 4 21st Mar 2005 08:13 PM
error message in Winword. ( Compile error in hidden module: AutoE. =?Utf-8?B?TXkgRXJyb3IgUHJvYmxlbQ==?= Microsoft Access Getting Started 1 4th Oct 2004 02:52 AM
excel 2003 error>> compile error in hidden module: ThisWorkbook clayton Microsoft Excel Misc 4 22nd Jun 2004 02:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:09 PM.