|
编译错误:发现二义性的名称:worksheet_selectionchange
多了一个 worksheet_selectionchange,但不会改,不会代码,求解,谢谢先!
- Option Explicit
- Private Sub Calendar1_Click()
- With Calendar1
- ActiveCell = .Value '赋值给激活单元格
- .Visible = False '隐藏日历控件
- End With
- End Sub
- '
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- With Calendar1
- If Target.Column = 1 Then '如果选择C列
- .Top = Target.Offset(0, 1).Top '设置位置
- .Left = Target.Offset(0, 1).Left
- .Visible = True '显示日历控件
- Else
- .Visible = False '隐藏日历控件
- End If
- End With
- End Sub
- Private Sub ListBox1_Change()
- If Reload Then Exit Sub '见下方说明
- For i = 0 To ListBox1.ListCount - 1
- If ListBox1.Selected(i) = True Then t = t & "," & ListBox1.List(i)
- Next
- ActiveCell = Mid(t, 2)
- End Sub
复制代码
两个效果就想要,不会代码,不会合并,求大神!
|
|