?
Solved

how to convert regular font to bold font in vb

Posted on 2003-03-15
4
Medium Priority
?
806 Views
Last Modified: 2013-12-02
i have stored set of stings in one variable
that stings in regular font how to convert bold font
0
Comment
Question by:kathavarayan
3 Comments
 
LVL 1

Accepted Solution

by:
Ysgrathe earned 160 total points
ID: 8142523
kathavarayan,

variables of type string do not hold display information, such as font type, size, or colour.
this formatting is provided by whatever means is used to display the string.

for example if a have a string...

dim strSomeText as string
strSomeText="This is a test string"

and i have a label control on my form called lblText

then if i make lblText's caption property equal to my string it will display the text, thus...

lblText.Caption = strSomeText

if you need to change the formatting access the various properties of the label control, like this...

    With lblText
        .Font = "Verdana"
        .FontBold = True
        .FontItalic = True
        .FontSize = 24
        .ForeColor = vbRed
    End With

there are other ways to display text that do not require controls such as text boxes of labels, but most of the time this is what you will use.
0
 

Expert Comment

by:CleanupPing
ID: 8900045
kathavarayan:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9699787
Moderator, my recommended disposition is:

    Accept Ysgrathe's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question