Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default excel colors

How do I add the below???

I opened a new excel doc, went to tools - visuall basic editor. Then
added the following to module1:

ThisWorkbook.Colors(1) = RGB(100, 200, 200)
ThisWorkbook.Colors(2) = RGB(100, 200, 200)
ThisWorkbook.Colors(55) = RGB(100, 200, 200)
ThisWorkbook.Colors(56) = RGB(100, 200, 200)

basically, what I am trying to do is change collors to custom collors
every time the document opens. TO eliminate the document reverting to
standard colors or custom set on that machine.

Thanks,

Sam

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default excel colors

If you just run that in a simple macro within the workbook, doesn't saving
it preserve those colours for you?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"samearle" wrote in message
ups.com...
How do I add the below???

I opened a new excel doc, went to tools - visuall basic editor. Then
added the following to module1:

ThisWorkbook.Colors(1) = RGB(100, 200, 200)
ThisWorkbook.Colors(2) = RGB(100, 200, 200)
ThisWorkbook.Colors(55) = RGB(100, 200, 200)
ThisWorkbook.Colors(56) = RGB(100, 200, 200)

basically, what I am trying to do is change collors to custom collors
every time the document opens. TO eliminate the document reverting to
standard colors or custom set on that machine.

Thanks,

Sam



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default excel colors

Go to the Thisworkbook module (in the vbe, go to the project explorer and
double click on ThisWorkbook for the Thisworkbook entry under your workbook's
tree).

In the left dropdown at the top select Workbook. From the right, select
OPEN.

Private Sub Workbook_Open()

End Sub

this will run whenever the workbook is opened and the user doesn't choose to
disable macros or have their security set to HIGH (xl2002 and later)

Put your code here

Private Sub Workbook_Open()

ThisWorkbook.Colors(1) = RGB(100, 200, 200)
ThisWorkbook.Colors(2) = RGB(100, 200, 200)
ThisWorkbook.Colors(55) = RGB(100, 200, 200)
ThisWorkbook.Colors(56) = RGB(100, 200, 200)

End Sub

that said, it shouldn't be an issue as the palette settings are stored in
the workbook. (if you change them and then save the workbook)

--
Regards,
Tom Ogilvy


"samearle" wrote:

How do I add the below???

I opened a new excel doc, went to tools - visuall basic editor. Then
added the following to module1:

ThisWorkbook.Colors(1) = RGB(100, 200, 200)
ThisWorkbook.Colors(2) = RGB(100, 200, 200)
ThisWorkbook.Colors(55) = RGB(100, 200, 200)
ThisWorkbook.Colors(56) = RGB(100, 200, 200)

basically, what I am trying to do is change collors to custom collors
every time the document opens. TO eliminate the document reverting to
standard colors or custom set on that machine.

Thanks,

Sam


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default excel colors

your the man! thanks! I'm assuming it is similar for word and will
figure it out.

S.

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
How do you make Excel use CMY colors instead of RGB colors? Jim Benet Setting up and Configuration of Excel 5 October 10th 08 02:16 PM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
excel 2007 colors do not match excel 2003 colors. Tom's Travails' Excel Discussion (Misc queries) 0 July 17th 08 01:56 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM


All times are GMT +1. The time now is 11:53 AM.

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

About Us

"It's about Microsoft Excel"