+ Reply to Thread
Results 1 to 4 of 4

excel colors

  1. #1
    samearle
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Tom Ogilvy
    Guest

    RE: 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. #4
    samearle
    Guest

    Re: excel colors

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

    S.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1