Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linefeed Character | Excel Worksheet Functions | |||
Spacebar creates value error | Excel Discussion (Misc queries) | |||
VLOOKUP post UDF (#DigitsFirstID) creates error | Excel Worksheet Functions | |||
Combobox creates error | Excel Worksheet Functions | |||
Delete creates error during Change event | Excel Programming |