|
或者
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Or Target.Row < 5 Then ListBox1.Visible = False: Exit Sub
If Intersect(Target, Range("c:ag")) Is Nothing Then ListBox1.Visible = False: Exit Sub
With ListBox1
' .Clear
.Top = Target.Top + Target.Height - Target.Height * Target.Row / 5
.Left = Target.Left + Target.Width
.BackColor = 15261110
.Font.Size = 12
' .TextAlign = fmTextAlignCenter
.TextAlign = fmTextAlignLeft
.Width = 75
.Height = 98
.List = Array("√ 出勤", "♀ 事假", "× 旷工", "♂ 病假", "◇ 休假", "¤ 迟到", "◎ 早退")
.Visible = True
End With
End Sub
|
|