Hi Vanbuuts,
I have four excel workbooks open and four tabs in Gruss open. I have different markets loaded into each tab and it works fine. My code in each work book, after checking for 16 columns updated, is enclosed in a With Workbooks (see below).
Does each of your workbooks have a unique name? This prevents any mix up.
Also I have separate instances of Excel for each workbook, rather than opening each workbook from within one excel window.
I've had issues in the past with referencing cells/sheets. When this has happened I've found the best solution is to fully reference things, for example instead of Range("Z1").Select, use Worksheets("Sheet1").Range("Z1").Select
T
- Code: Select all
Public Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
With Workbooks("THE NAME OF THIS WORKBOOK").Sheets(Target.Worksheet.Name)
'
'All your code goes here
'
End With
Application.EnableEvents = True
End Sub