+ Reply to Thread
Results 1 to 4 of 4

Compile Error on Chr(13)

  1. #1
    scottfoxall
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: Compile Error on Chr(13)

    try using vbNewline

    --
    HTH

    Bob Phillips

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

    "scottfoxall" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Andrew Taylor
    Guest

    Re: 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. #4
    scottfoxall
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1