+ Reply to Thread
Results 1 to 3 of 3

Change cell format based on its color

  1. #1
    Anders
    Guest

    Change cell format based on its color

    Dear Experts

    Being new to VBA I have following question.
    In an Excel 2003 workbook, where all cells as default are protected, I
    would like to unprotect cells with a specific color.
    Can any of you give a clue?

    Thanks in advance
    Anders
    Copenhagen


  2. #2
    Tom Ogilvy
    Guest

    Re: Change cell format based on its color

    Is the color produce by conditional formatting?

    If not

    assuming the sheet is unprotected.

    For each cell in activesheet.UsedRange
    if cell.interior.ColorIndex = 5
    cell.Locked = False
    end if
    Next

    --
    Regards,
    Tom Ogilvy

    "Anders" <[email protected]> wrote in message
    news:[email protected]...
    > Dear Experts
    >
    > Being new to VBA I have following question.
    > In an Excel 2003 workbook, where all cells as default are protected, I
    > would like to unprotect cells with a specific color.
    > Can any of you give a clue?
    >
    > Thanks in advance
    > Anders
    > Copenhagen
    >




  3. #3
    Anders
    Guest

    Re: Change cell format based on its color

    Is it really that simple!
    Thanks a lot Tom - my problem is solved.
    Br
    Anders


+ 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