Computerman
Board Regular
- Joined
- Mar 3, 2016
- Messages
- 91
I am writing code to have multiple worksheets update a master worksheet and need to find a way to have the Interior.Color value in cells in one spreadsheet cause the corresponding cell in a different spreadsheet have the same Interior.color.
here is the code I have so far:
it fails on the Interior.color line. It is only checking for column A at the moment, once I get that working then I will check the rest of the rows, currently out to AF but that is likely to change.
thank you,
Computerman
here is the code I have so far:
Code:
Option Explicit
Dim LastRow As Long
Dim wb As Workbook
Dim x As Integer
Dim y As Integer
Private Sub cmdSync_Click()
'determine the last row of the Master Worksheet
For Each wb In Application.Workbooks
If wb.Name = "KAR process tracker - Master.xlsm" Then
LastRow = wb.Sheets("Sheet1").Range("A65536").End(xlUp).Row
For x = 2 To LastRow
wb.Sheets("Sheet1").Range("A" & x).Value = Range("A" & x).Value
wb.Sheets("Sheet1").Interior.Color = Range("A" & x).Interior.Color
Next x
End If
Next wb
End Sub
thank you,
Computerman