+ Reply to Thread
Results 1 to 4 of 4

Thread: Format text in a textbox

  1. #1
    DB
    Guest

    Format text in a textbox

    Is it possible to formate lines of text in a textbox with bullets? I was
    hoping I could place a button that when clicked would format the paragraphs
    with bullets. This textbox would be on a userform.

    Anyone have any ideas?

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    345
    Quote Originally Posted by DB
    Is it possible to formate lines of text in a textbox with bullets? I was
    hoping I could place a button that when clicked would format the paragraphs
    with bullets. This textbox would be on a userform.

    Anyone have any ideas?
    Since textbox supports only printable ASCII set, I think in true sense you cannot format with bullets. But as a work around you could search for a new line and add let us say "*" as bullet at the begining of new line. You are then introducing additional characters ( eg. * ) but it will appear to be formatted with bullets. A simple code line
    Set TB = UserForm1.TextBox1
    TB.Value= Replace(TB.Value, CHR$(10), "* ")
    should do the trick.

    A V Veerkar

  3. #3
    DB
    Guest

    Re: Format text in a textbox

    Thank you for the suggestion, I'll make it happen. BTW, can you remind me
    what the $ symbol in your CHR$ means?

    "avveerkar" wrote:

    >
    > DB Wrote:
    > > Is it possible to formate lines of text in a textbox with bullets? I
    > > was
    > > hoping I could place a button that when clicked would format the
    > > paragraphs
    > > with bullets. This textbox would be on a userform.
    > >
    > > Anyone have any ideas?

    >
    > Since textbox supports only printable ASCII set, I think in true sense
    > you cannot format with bullets. But as a work around you could search
    > for a new line and add let us say "*" as bullet at the begining of new
    > line. You are then introducing additional characters ( eg. * ) but it
    > will appear to be formatted with bullets. A simple code line
    > Set TB = UserForm1.TextBox1
    > TB.Value= Replace(TB.Value, CHR$(10), "* ")
    > should do the trick.
    >
    > A V Veerkar
    >
    >
    > --
    > avveerkar
    > ------------------------------------------------------------------------
    > avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338
    > View this thread: http://www.excelforum.com/showthread...hreadid=510452
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: Format text in a textbox

    it means return a string. As I understand it, there really is no
    difference between CHR and CHR$ in VBA 6.

    ? typename(chr(57))
    String
    ? typename(chr$(57))
    String



    --
    Regards,
    Tom Ogilvy

    "DB" <DB@discussions.microsoft.com> wrote in message
    news:4B0E67B0-92A4-4ACD-AA7D-895BD041C53C@microsoft.com...
    > Thank you for the suggestion, I'll make it happen. BTW, can you remind me
    > what the $ symbol in your CHR$ means?
    >
    > "avveerkar" wrote:
    >
    > >
    > > DB Wrote:
    > > > Is it possible to formate lines of text in a textbox with bullets? I
    > > > was
    > > > hoping I could place a button that when clicked would format the
    > > > paragraphs
    > > > with bullets. This textbox would be on a userform.
    > > >
    > > > Anyone have any ideas?

    > >
    > > Since textbox supports only printable ASCII set, I think in true sense
    > > you cannot format with bullets. But as a work around you could search
    > > for a new line and add let us say "*" as bullet at the begining of new
    > > line. You are then introducing additional characters ( eg. * ) but it
    > > will appear to be formatted with bullets. A simple code line
    > > Set TB = UserForm1.TextBox1
    > > TB.Value= Replace(TB.Value, CHR$(10), "* ")
    > > should do the trick.
    > >
    > > A V Veerkar
    > >
    > >
    > > --
    > > avveerkar
    > > ------------------------------------------------------------------------
    > > avveerkar's Profile:

    http://www.excelforum.com/member.php...o&userid=30338
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=510452
    > >
    > >




+ 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.2.0