Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

Excel: Custom Style Color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josef Brunner - 20 Apr 2006 14:50 GMT
Hi,

I need to create a Styel object for my Excel Workbook that contains a
special color. I only know the html-like string for this color. Like

Style.Interior.Color = "#FFFFF"

Any help is appreciated,
Kurt
"Peter Huang" [MSFT] - 21 Apr 2006 07:42 GMT
Hi

Based on the VBA document as below.
<Microsoft Office>\OFFICE11\1033\VBAXL10.CHM
Color Property
See AlsoApplies ToExampleSpecificsReturns or sets the primary color of the
object, as shown in the following table. Use the RGB function to create a
color value. Read/write Variant.

So the Color should be similar as below.
Color = RGB(255,255,255) which means the white.

For detailed information, you may try to consult the help file above.

You may first tried in the VBA macro, and then do that in the Interop code.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Josef Brunner - 24 Apr 2006 08:45 GMT
> So the Color should be similar as below.
> Color = RGB(255,255,255) which means the white.

Thanks!

I found a HTML Color --> RGB color converter on the internet and used the
rgb function to set the color needed.

Thank you very much,
Kurt
"Peter Huang" [MSFT] - 24 Apr 2006 11:18 GMT
Hi Kurt,

You are welcomed!

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.