Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
Calendar1.Visible = False
ActiveCell.Offset(, 1).Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal T As Range)
If T.Count > 2 Then End
If T.Address <> "$I$10:$J$10" Then End
Me.Calendar1.Visible = True
End Sub作者: 周大偉 時間: 2010-11-13 22:10
大大好, 謝謝回應
小弟把程式貼於編輯區, 但不成功, 應是要把原有程式與大大程式融合,請大大教導, 謝謝!!
Private Sub Worksheet_SelectionChange(ByVal T As Range)
If T.Count > 2 Then End
For Each C In [d15:d35]
If C.Value >= 1 And C.Value < 500 Then C.Borders(6).LineStyle = 1
Next
If Not Application.Intersect([h15:h35], T) Is Nothing Then
If T.Borders(6).LineStyle = 1 Then
T.Borders(6).LineStyle = 0
Else
T.Borders(6).LineStyle = 1
End If
ElseIf T.Address = "$I$10J$10" Then
If Len(T(1) & T(2)) = 0 Then T = Date Else T = ""
End If
End Sub
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
Calendar1.Visible = False
ActiveCell.Offset(, 1).Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal T As Range)
If T.Count > 2 Then End
If T.Address <> "$I$10J$10" Then End
Me.Calendar1.Visible = True
End Sub作者: oobird 時間: 2010-11-13 22:37