![]() |
Compile error [Chr(13)]
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 |
Compile error [Chr(13)]
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 |
Compile error [Chr(13)]
Hallo Hennie,
What you can try is replace all Chr(13) with vbCrLf or vbNewLine HTH, Wouter. |
Compile error [Chr(13)]
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" wrote in message ... 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 |
Compile error [Chr(13)]
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" wrote in message ... 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" wrote in message ... 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 |
All times are GMT +1. The time now is 05:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com