Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Linefeed character creates runtime error in Sweden

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Linefeed character creates runtime error in Sweden

On the problem PC, which reference shows as "missing" in the VBE ?
As far as I know there should be no location-specific problem using chr(10):
your error is most likely a side-effect of some other issue.

Tim

--
Tim Williams
Palo Alto, CA


"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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Linefeed character creates runtime error in Sweden

Tim, thanks for the reply. I did ask him to check that he
had all the references which I had checked, and he said he
wasn't missing any of them. And as I said, when I removed
the chr(10) code, he had no error.

-Kate

Tim Williams wrote:
On the problem PC, which reference shows as "missing" in the VBE ?
As far as I know there should be no location-specific problem using chr(10):
your error is most likely a side-effect of some other issue.

Tim

  #4   Report Post  
Posted to microsoft.public.excel.programming
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Linefeed character creates runtime error in Sweden

Peter, thank you for those suggestions. I will pursue them
as possible solutions. -Kate

Peter T wrote:
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linefeed Character Jen[_4_] Excel Worksheet Functions 5 June 28th 07 05:50 PM
Spacebar creates value error Dennis1188 Excel Discussion (Misc queries) 5 March 4th 07 04:58 PM
VLOOKUP post UDF (#DigitsFirstID) creates error bactfarmer Excel Worksheet Functions 0 January 26th 07 08:49 AM
Combobox creates error Stephen Excel Worksheet Functions 0 January 23rd 05 10:55 AM
Delete creates error during Change event Random Excel Programming 4 August 28th 03 08:37 AM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"