Changing font color of textbox text.....

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

Guest

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
 
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
 

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