|
今日宣传成果表
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Application.ScreenUpdating = False
- If Target.Column = 1 And Target.Row > 4 And Target.Count = 1 Or Target.Column = 6 Then
- Set wb = Workbooks.Open(ThisWorkbook.Path & "\数据资料\体验履历.xls")
- Set rng = wb.Sheets("体验日记").Columns(1).Find(Target.Value, , , xlWhole)
- If Not rng Is Nothing Then
- For i = 1 To 4
- k = i + Target.Column
- With ThisWorkbook.Sheets("今日宣传成果")
- .Cells(Target.Row, k) = wb.Sheets("体验日记").Cells(rng.Row, i + 1)
- End With
- Next
- End If
- wb.Close 0
- Set wb = Nothing
- End If
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|