ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why would 1 excel PC understand chr(13) and anoughter wouldn't? (https://www.excelbanter.com/excel-programming/401545-why-would-1-excel-pc-understand-chr-13-anoughter-wouldnt.html)

thefirstcybot

Why would 1 excel PC understand chr(13) and anoughter wouldn't?
 
I have created a textbox within a Userform within excel.
Within the code I used the code for a carriage return "chr(13)".

My PC likes this code and everything runs fine, but other PC's do not
understand it and refuse to run the code?

Why? We are all using the same OS and the same version of Excel?

[email protected]

Why would 1 excel PC understand chr(13) and anoughter wouldn't?
 
On Nov 22, 1:57 pm, thefirstcybot
wrote:
I have created a textbox within a Userform within excel.
Within the code I used the code for a carriage return "chr(13)".

My PC likes this code and everything runs fine, but other PC's do not
understand it and refuse to run the code?

Why? We are all using the same OS and the same version of Excel?


Seems a bit strange ... try using vbCrLf instead of chr(13) and see if
that works.

Peter T

Why would 1 excel PC understand chr(13) and anoughter wouldn't?
 
Are you using the code from the same workbook or merely identical copies of
the same code. If the latter, my guess is the textbox's MultiLine property
is true in one wb & false in the other, and/or similar with WordWrap.

Regards,
Peter T

"thefirstcybot" wrote in message
...
I have created a textbox within a Userform within excel.
Within the code I used the code for a carriage return "chr(13)".

My PC likes this code and everything runs fine, but other PC's do not
understand it and refuse to run the code?

Why? We are all using the same OS and the same version of Excel?




Jim Thomlinson

Why would 1 excel PC understand chr(13) and anoughter wouldn't?
 
It possibly is not the Chr(13) at all. One thing to check on the machines
that have the problem is look for missing refernces. In the VBE select
Tools|Refernces and look for anything that starts with Missing:
--
HTH...

Jim Thomlinson


"thefirstcybot" wrote:

I have created a textbox within a Userform within excel.
Within the code I used the code for a carriage return "chr(13)".

My PC likes this code and everything runs fine, but other PC's do not
understand it and refuse to run the code?

Why? We are all using the same OS and the same version of Excel?


RB Smissaert

Why would 1 excel PC understand chr(13) and anoughter wouldn't?
 
99% sure that this is caused by a missing reference as explained by Jim T.

RBS


"thefirstcybot" wrote in message
...
I have created a textbox within a Userform within excel.
Within the code I used the code for a carriage return "chr(13)".

My PC likes this code and everything runs fine, but other PC's do not
understand it and refuse to run the code?

Why? We are all using the same OS and the same version of Excel?




All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com