Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Compile Error on Chr(13)

Hi there everone

I have a maco that populates a multiline TextBox, and here is a snip of code
that falls over:

UserForm2.TextBox4.Value = UserForm2.TextBox4.Value & Chr(13) & ppan

The error is pointed towards Chr(10), which is a Return (new line)

This macro works on some PCs but not on others?

All PCs use Excel 2000 with VBA Version 6.3

Anybody got any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Compile Error on Chr(13)

try using vbNewline

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"scottfoxall" wrote in message
...
Hi there everone

I have a maco that populates a multiline TextBox, and here is a snip of

code
that falls over:

UserForm2.TextBox4.Value = UserForm2.TextBox4.Value & Chr(13) & ppan

The error is pointed towards Chr(10), which is a Return (new line)

This macro works on some PCs but not on others?

All PCs use Excel 2000 with VBA Version 6.3

Anybody got any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default Compile Error on Chr(13)

Possibly a missing reference - check Tools/References in VBA.

scottfoxall wrote:
Hi there everone

I have a maco that populates a multiline TextBox, and here is a snip of code
that falls over:

UserForm2.TextBox4.Value = UserForm2.TextBox4.Value & Chr(13) & ppan

The error is pointed towards Chr(10), which is a Return (new line)

This macro works on some PCs but not on others?

All PCs use Excel 2000 with VBA Version 6.3

Anybody got any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Compile Error on Chr(13)

Thankyou Andrew

That did the trick. I had a CAD link in the script so these where tagged as
missing on PCs without CAD.



"Andrew Taylor" wrote:

Possibly a missing reference - check Tools/References in VBA.

scottfoxall wrote:
Hi there everone

I have a maco that populates a multiline TextBox, and here is a snip of code
that falls over:

UserForm2.TextBox4.Value = UserForm2.TextBox4.Value & Chr(13) & ppan

The error is pointed towards Chr(10), which is a Return (new line)

This macro works on some PCs but not on others?

All PCs use Excel 2000 with VBA Version 6.3

Anybody got any ideas?



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
How do I automatically compile totals from 12 worksheets into 1? PippyKat Excel Worksheet Functions 2 June 23rd 06 02:39 PM
compile error in hidden module: autoexecnew - how do I get rid? Joespo Charts and Charting in Excel 1 November 10th 05 03:41 PM
Compile error in hidden module arjay Excel Discussion (Misc queries) 5 September 16th 05 12:47 AM
Compile Errors with Different versions of Excel PStephens Excel Discussion (Misc queries) 2 March 14th 05 04:27 PM


All times are GMT +1. The time now is 08:45 AM.

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"