ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Color Pallette (https://www.excelbanter.com/excel-programming/337639-color-pallette.html)

Steve

Color Pallette
 
I have just discovered that the color numbers for the cells and the color
numbers for BackColor for labels and text boxes are different numbers. I
have a UserForm and I want the users of the spreadsheet to click on names in
a list box and turn the color of a text box on the UserForm the same color as
a cell on the spreadsheet that belongs to them, but the color numbers are
different. Any ideas how to correlate these two numbering systems?

Thanks,

Tom Ogilvy

Color Pallette
 
This worked for me:

Private Sub CommandButton1_Click()
TextBox1.BackColor = ActiveCell.Interior.Color
End Sub


--
Regards,
Tom Ogilvy


"Steve" wrote in message
...
I have just discovered that the color numbers for the cells and the color
numbers for BackColor for labels and text boxes are different numbers. I
have a UserForm and I want the users of the spreadsheet to click on names

in
a list box and turn the color of a text box on the UserForm the same color

as
a cell on the spreadsheet that belongs to them, but the color numbers are
different. Any ideas how to correlate these two numbering systems?

Thanks,





All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com