Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zathras, please help again 1

Status
Not open for further replies.

Boomerang

Programmer
Joined
Mar 30, 2001
Messages
766
Location
NL
Zathras,

PLEASE HELP AGAIN, with thread68-521986

I used your example, but I noticed that I CAN NOT copy and past anymore in the master-sheet ???

If I ignore the macro's when I open the file the copy and past posibility in the master-sheet is back to normal ?????

Please help,
Erik
<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
See my answer in the other thread.

A second star for you, you are a real pro !!!

Thanx,
Erik <-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
Hi Zathras

There is still something that won't work:
If I select a range on the master (2 or more cells) and change the color of all of theme then nothing or sometimes only one cell on the Slave is changed.

Can you help me again with this ???

Erik <-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
Ok. This is getting way too complicated. Time for another apporoach. Scrap everything I sent you and do this:

In the code page for the &quot;second&quot; sheet:
Code:
Option Explicit
Private Sub Worksheet_Activate()
  MatchColors
End Sub
In a code module:
Code:
Option Explicit
Const MASTER_SHEET = &quot;first&quot;
Code:
 ' <-- change to real sheet name
Code:
Sub MatchColors()
Dim c As Range
Dim r As Range
  For Each c In ActiveSheet.UsedRange
    If c.HasFormula Then
      If InStr(1, c.Formula, MASTER_SHEET) > 0 Then
        Set r = Sheets(MASTER_SHEET).Range(c.Address)
        c.Interior.ColorIndex = r.Interior.ColorIndex
      End If
    End If
  Next c
  Set r = Nothing
End Sub
This way you can even have multiple &quot;second&quot; sheets if required. Just put a Worksheet_Activate event handler for each &quot;second&quot; sheet you want to match colors on.
 
Thanx Zathras,

Works great !!

Erik <-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top