trying to set large bolt font in a richtextbox vb6

With rtfDay(19)
    .Text = "3"
    .SelFontName = "Arial"
    .SelFontSize = 28
    .SelAlignment = rtfCenter
    .SelBold = True
End With

Open in new window

The 3 gets entered into the Ricjhtextbox, but is not large or bold
what is the problem ?
isnoend2001Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
try set SelStart and SelLength properties first?

With rtfDay(19)
    .Text = "3"
   .SelStart = 1
    .SelLength = 1

    .SelFontName = "Arial"
    .SelFontSize = 28
    .SelAlignment = rtfCenter
    .SelBold = True
End With
isnoend2001Author Commented:
Thanks did not fix the issue
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
check this out and see if it helps? (I don't have VB6 with me so can't really run and test it)

change the color of rich text box in vb6
http://www.codeproject.com/Questions/776677/change-the-color-of-rich-text-box-in-vb
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Chris WatsonSoftware DeveloperCommented:
Ryan, you were so close.

isno, change the SelStart assignment to:

.SelStart = 0

Open in new window


Big ol' 3.
That seems to work.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
ok, I must have forgotten SelStart index should start from 0...  not doing VB6 for many years now
isnoend2001Author Commented:
Don't know why it does not work for mertf filertf file
isnoend2001Author Commented:
Don't know why it does not work for me. the code:
Private Sub Command1_Click()
With rtfDay(19)
    .SelStart = 0
    .SelLength = 1
    .Text = "3"
    .SelFontName = "Arial"
    .SelFontSize = 28
    .SelAlignment = rtfCenter
    .SelBold = True
    .BackColor = vbWhite
End With
End Sub

Open in new window

Chris WatsonSoftware DeveloperCommented:
Try setting the Text property before the SelStart and SelLength properties, like the order in Ryan's post.

Private Sub Command1_Click()
    With rtfDay(19)
        .Text = "3"
        .SelStart = 0
        .SelLength = 1
        .SelFontName = "Arial"
        .SelFontSize = 28
        .SelAlignment = rtfCenter
        .SelBold = True
        .BackColor = vbWhite
    End With
End Sub                             

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
isnoend2001Author Commented:
Thanks that worlks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.