Format text in a textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
DB said:
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
 
Thank you for the suggestion, I'll make it happen. BTW, can you remind me
what the $ symbol in your CHR$ means?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top