Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jan Jan is offline
external usenet poster
 
Posts: 159
Default Changing font color of textbox text.....

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Changing font color of textbox text.....

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
Jan Jan is offline
external usenet poster
 
Posts: 159
Default Changing font color of textbox text.....

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing font color of textbox text.....

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
Jan Jan is offline
external usenet poster
 
Posts: 159
Default Changing font color of textbox text.....

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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Font color changing by itself EJamison Excel Discussion (Misc queries) 2 September 18th 08 05:34 PM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Changing Font Color bagoxc Excel Discussion (Misc queries) 2 July 17th 06 01:14 AM
changing font color for new text DanDavis Excel Discussion (Misc queries) 2 July 24th 05 04:17 PM
Changing Font Color Brad E Excel Programming 3 April 7th 04 02:12 PM


All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"