![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 27
|
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 |
|
New Member
Join Date: Apr 2002
Posts: 14
|
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 |
|
New Member
Join Date: Apr 2002
Posts: 27
|
JSearcy,
I've tried that and it doesn't work. I'm stumped on this one. Thanks for your reply. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
New Member
Join Date: Apr 2002
Posts: 27
|
You da MAN, Tom.
Your tip did it! Thanks, Bidwin |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|