Changing font color of textbox text.....
Assuming a textbox on a userform:
Private Sub CommandButton2_click()
TextBox1.BackColor = RGB(0, 255, 255)
If TextBox1.ForeColor = RGB(255, 255, 255) Then
TextBox1.ForeColor = RGB(255, 0, 255)
Else
TextBox1.ForeColor = RGB(255, 255, 255)
End If
End Sub
--
Regards,
Tom Ogilvy
"jan" wrote in message
...
Hi Tom
Can you explain that with some code?
thanks Jan
"Tom Ogilvy" wrote:
Use the forecolor property
--
Regards,
Tom Ogilvy
"jan" wrote in message
...
.font color=rgb(255,255,255)
"ben" wrote:
waht code are you running that gave you the error?
"jan" wrote:
Hi all,
I've a textbox on the userform that's shows the names of all the
files
openend by my vba code.
Now I will change the font color when file x is open(i.e.on the j:
drive) or
when file y is open(i.e on the c:drive) the font color must change
to
another
color.
I got an error message 438 when running the code.
Is there a solution for this?
Kind regards
Jan
|