![]() |
2 cells 2 colors
Hi All, Here's my glitch: I've got 2 dropdown/combo boxes in a user form. Both offer various color options. The 1st one colors an active cell the correct color that is chosen. The 2nd dropdown colors the cell directly to the right or the active cell in the same manner. My code is pretty crude & not very efficient, but it works correctly. The problem is when color 2 is not chosen. Currently, if a color isn't chosen, I can put an "X" in the cell, or color it a certain color, but what I want is to color it whatever the color of the active cell is. Any ideas? Thanks! -- Soundman ------------------------------------------------------------------------ Soundman's Profile: http://www.excelforum.com/member.php...o&userid=24428 View this thread: http://www.excelforum.com/showthread...hreadid=387999 |
Soundman,
Not sure I follow your requirements. If you just want to duplicate the color of the active cell one cell to the right, how about: If no color in 2nd box ' (This is psuedo-code, ' you have to make it work in your context ActiveCell.Offset(0, 1).Font.ColorIndex = ActiveCell.Font.ColorIndex -- Earl Kiosterud "Soundman" wrote in message ... Hi All, Here's my glitch: I've got 2 dropdown/combo boxes in a user form. Both offer various color options. The 1st one colors an active cell the correct color that is chosen. The 2nd dropdown colors the cell directly to the right or the active cell in the same manner. My code is pretty crude & not very efficient, but it works correctly. The problem is when color 2 is not chosen. Currently, if a color isn't chosen, I can put an "X" in the cell, or color it a certain color, but what I want is to color it whatever the color of the active cell is. Any ideas? Thanks! -- Soundman ------------------------------------------------------------------------ Soundman's Profile: http://www.excelforum.com/member.php...o&userid=24428 View this thread: http://www.excelforum.com/showthread...hreadid=387999 |
Thanks for the help, but that didn't work. The target cell had no color change. It didn't pop up an error though. :confused: -- Soundman ------------------------------------------------------------------------ Soundman's Profile: http://www.excelforum.com/member.php...o&userid=24428 View this thread: http://www.excelforum.com/showthread...hreadid=387999 |
I re-read the code & changed Font.Color for Interior.Color & that's it! Thank you!!! -- Soundman ------------------------------------------------------------------------ Soundman's Profile: http://www.excelforum.com/member.php...o&userid=24428 View this thread: http://www.excelforum.com/showthread...hreadid=387999 |
All times are GMT +1. The time now is 05:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com