+ Reply to Thread
Results 1 to 6 of 6

Changing font color of textbox text.....

  1. #1
    jan
    Guest

    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. #2
    ben
    Guest

    RE: 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. #3
    jan
    Guest

    RE: 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. #4
    Tom Ogilvy
    Guest

    Re: Changing font color of textbox text.....

    Use the forecolor property

    --
    Regards,
    Tom Ogilvy

    "jan" <[email protected]> wrote in message
    news:[email protected]...
    > .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. #5
    jan
    Guest

    Re: 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" <[email protected]> wrote in message
    > news:[email protected]...
    > > .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. #6
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Tom
    > Can you explain that with some code?
    > thanks Jan
    > "Tom Ogilvy" wrote:
    >
    > > Use the forecolor property
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "jan" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > .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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1