For
i = 2
To
rowIMSTRA
If
Cells(i, 7) =
"X"
Then
IFSINOREV = Cells(i, 2) & Cells(i, 3)
temp =
""
SystemSpecWKB.Activate
For
j = 6
To
rowSYSTEM
If
IFSINOREV = Cells(j, 3) & Cells(j, 8)
Then
SYSTEMID = Cells(j, 10)
AnlagenWKB.Activate
SySerialNo =
""
Systemname =
""
For
k = 6
To
rowANLAGEN
If
SYSTEMID = Cells(k, 5)
Then
SySerialNo = Cells(k, 6)
Systemname = Cells(k, 7)
Exit
For
End
If
Next
k
wbk_reform.Activate
Sheets(1).Activate
Set
rng = ActiveSheet.Cells(i, 7)
If
rng.Comment
Is
Nothing
Then
rng.AddComment
rng.Comment.Text temp & SySerialNo &
" - "
& Systemname
temp = temp & SySerialNo &
" - "
& Systemname & Chr(10)
rng.Comment.Shape.TextFrame.AutoSize =
True
End
If
SystemSpecWKB.Activate
Next
j
End
If
Next
i