Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: It finally works!!

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    but with a minor inconvenience. I can't get data I move from a worksheet to a userform text box to display in any color but gray. The font is correct, and it changes if I change the Font property in the Prpoerties area. I've set ForeColor there, and I've included the following statements before and after moving the data but none of these work:
    LATA.ForeColor = 26
    LATA.ForeColor = RGB(200, 0, 200).

    I move the data with:
    LATA.Value = Worksheets(1).Cells(ROWW, 2)

    Any ideas how to get the data to display in color???

    Also, is it necessary to unload a userform when quitting an application? I have a command button that's used to exit the app:
    Private Sub QUITbtn_Click()
    Unload CLLIsearch
    Workbooks(1).Close SaveChanges:=False
    End Sub

    Thanks to all for your earlier responses. They've been very helpful.
    Regards,
    Bidwin

  2. #2
    New Member
    Join Date
    Apr 2002
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Have you tried

    controlname.forecolor = vbRed

    (You can use whatever color you need, rather then red i.e.:vbBlue, vbGreen, vbBlack...)

    This works with Visual Basic and also with VBA.

    As far as I know, you don't have to unload your form when closing Excel, it will unload when you close the program by default. There may be others who disagree, however.

    Hope that helps you.

    [ This Message was edited by: JSearcy on 2002-05-03 08:38 ]

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    JSearcy,
    I've tried that and it doesn't work. I'm stumped on this one.

    Thanks for your reply.

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Bidwin,
    Check the properties for textbox...
    Make sure enabled = true...
    If it is disabled, the code can change the value of the text, but it will forever be gray...
    Tom

  5. #5
    New Member
    Join Date
    Apr 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You da MAN, Tom.
    Your tip did it!
    Thanks,
    Bidwin

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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