View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Linefeed character creates runtime error in Sweden

Hi Kate,

My guess is you built your project in a later version of Excel that of your
user in Sweden.
Try changing -
chr(10)
to
VBA.Strings.Chr(10)

If that fixes the current problem it would indicate a version difference and
a possibility of other problems yet to be discovered.

Because of the "can't find project or library" without missing ref, you
mentioned, I'll lay odds on the above. Solution, build in the earliest
version, or ask user to recreate a new workbook and drag modules from old
into the new.

Otherwise - chr(10), hmm, not sure if that works correctly in a Mac, but if
user indeed has a Mac try vbNewLine instead.

Regards,
Peter T

"Kate" wrote in message
...
Has anyone heard of this:

I have designed a spreadsheet so that each cell's data
validation text and title appear in a text box at the top of
the screen as the cell is entered. I have used chr(10) in
the VBA code to insert a line feed between the title and the
text in the text box. This of course works fine in this
country (USA), but I had a report from a user in Sweden that
he was getting a run-time error at this line, 'can't find
project or library.' He has all the same references checked
as did I.

When I removed the chr(10) code and put the title and text
on the same line, it worked fine!

Is there some other linefeed character that anyone knows
about which works in ALL languages??

Thanks for your help all,
Kate