Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
color Banding using visual basic Jeff Excel Worksheet Functions 1 March 14th 07 02:11 AM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Changing the color of a Series Collection using visual basic? Koreef Charts and Charting in Excel 1 March 17th 05 03:17 AM


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"