It finally works!!

Bidwin

New Member
Joined
Apr 21, 2002
Messages
49
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
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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
 
Upvote 0
JSearcy,
I've tried that and it doesn't work. I'm stumped on this one.

Thanks for your reply.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,943
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top