我在工作簿中加了这一行代码, 是之前在另外一位大神那里看到的。
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 5 Or Target.Row < 10 Or Target.Row > 15 Then Exit Sub
cal.Show 0
End Sub
然后在cls那个class Modules中的最后第二行End With后面加了
Unload cal
实现点击之后关闭窗体