![]() |
Visual Basic Color Palette
Good morning, I was wondering if there is a way to customize the color palette i Visual Basic. I want to lighten some of the default colors to b applied to my forms but have not figured how to go about this. Changing the palette in excel - tools - options did not have an effec on my choices in VB. Thanks d -- toocol ----------------------------------------------------------------------- toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160 View this thread: http://www.excelforum.com/showthread.php?threadid=53058 |
Visual Basic Color Palette
Define what you mean when you say "forms".
the palette in Excel only pertains to the worksheet. http://www.mvps.org/dmcritchie/excel/colors.htm -- Regards, Tom Ogilvy "toocold" wrote: Good morning, I was wondering if there is a way to customize the color palette in Visual Basic. I want to lighten some of the default colors to be applied to my forms but have not figured how to go about this. Changing the palette in excel - tools - options did not have an effect on my choices in VB. Thanks dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
Visual Basic Color Palette
I have created a userform and I want to use a custom color for the background. I want to match it to a company logo which is lighter than the default colors in the Visual Basica Palette. Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
Visual Basic Color Palette
in a new workbook, put in a userform and put this in the code module of the
userform. Then select the userform and hit the run button. Private Sub UserForm_Activate() Dim r As Long, g As Long, b As Long Dim delay As Long delay = 5000 For i = 1 To 255 Step 15 l = RGB(0, i, 0) Me.BackColor = l Me.Repaint For j = 1 To delay DoEvents Next j Next i For i = 1 To 255 Step 15 l = RGB(i, 255, i) Me.BackColor = l Me.Repaint For j = 1 To delay DoEvents Next j Next i End Sub I don't think you are restricted to the palette colors. -- Regards, Tom Ogilvy "toocold" wrote: I have created a userform and I want to use a custom color for the background. I want to match it to a company logo which is lighter than the default colors in the Visual Basica Palette. Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
Visual Basic Color Palette
I think I figured it out. Visual Basic appears to reverse the RGB codes. If you convert them to BGR, the codes appear to work in visual basic. Does anyone know of an online color chart that already does this conversion? Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
Visual Basic Color Palette
I already gave you a link. Apparently you don't want to put in the effort
to look at it. -- Regards, Tom Ogilvy "toocold" wrote in message ... I think I figured it out. Visual Basic appears to reverse the RGB codes. If you convert them to BGR, the codes appear to work in visual basic. Does anyone know of an online color chart that already does this conversion? Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
Visual Basic Color Palette
Sorry Tom, I apologize if it came across that I had not looked at what you had provided but the link you gave me contained the codes for 56 colors. I was looking for a more complete color chart. Basically, I was looking for a quick reference color chart like those provided by visibone which has 216 colors arranged by hue with the html color codes. By rearranging the codes I was able to match the background of the userform to the company logo but I was just curious for future projects. The shade of color I needed was not provided on the color palette or on the link that you had given me. I was just asking if anyone knew of a more comprehensive color chart. Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=530585 |
All times are GMT +1. The time now is 04:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com