English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i hv to make this vb prgm in which i hv to place font size and type in 2 different text boxes according which date which is displayed on label gets changed accordingly

someone told me following coding but there is some error and i cant solve it

Private Sub Command1_Click()
Dim aa As String
Label1.Caption = " 19 march 2007 "
Label1.FontSize = Val(Bold.Text)
aa = Text2.Text
If aa = "bold" Then
Label1.Font.Bold = True
Label1.Font.Italic = False
ElseIf aa = "italic" Then
Label1.Font.Italic = True
Label1.Font.Bold = False
Else
Label1.Font.Bold = False
Label1.Font.Bold = False
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Label1.Caption = ""
End Sub

2007-03-19 03:17:19 · 3 answers · asked by parwan005 1 in Computers & Internet Programming & Design

3 answers

What is the problem, what does the error say? To change the font of a textbox...

The problem is probally changing the font.
Here is an example on how to change the font
txt1.Font = New Font("Arial", 24)

2007-03-21 12:09:00 · answer #1 · answered by Anonymous · 0 0

Your first problem is you have nothing in Text object Text2. You cannot change the font of '' to italic or style to bold etc.

2007-03-19 10:27:33 · answer #2 · answered by Sane 6 · 0 0

It would be helpful if you restate your question. I'd like to help but I'm a little confused on what your trying to say.

2007-03-19 10:57:15 · answer #3 · answered by ucftrev 2 · 0 0

fedest.com, questions and answers