不知你說什麼
也許你跟本沒寫這個事件
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
Calendar1.Visible = True
End Sub作者: imzues 時間: 2011-5-9 14:41
本帖最後由 imzues 於 2011-5-9 14:51 編輯
不好意思請教一下
Private Sub Calendar1_Click()
[B2:B65536] = Calendar1.Value
Calendar1.Visible = False
End Sub
這樣的寫法還像整排都是同一個值
可以B2的月曆點出值輸出在B2
若選點B3的月曆點出值輸出在B3
可以嗎?作者: chin15 時間: 2011-5-9 15:20
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub作者: imzues 時間: 2011-5-9 15:51
感謝~太強了!!作者: imzues 時間: 2011-5-9 16:24
請問一下我好像沒辦法讓第二組月曆點完關起來
我下面要怎麼修改ㄚ??
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub
Private Sub Calendar2_Click()
ActiveCell = Calendar2.Value
Calendar1.Visible = False
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 2 Or Target.Column <> 3 Then Exit Sub
Calendar1.Visible = True
Calendar2.Visible = True
End Sub作者: oobird 時間: 2011-5-9 16:28
Private Sub Calendar2_Click()
ActiveCell = Calendar2.Value
Calendar2.Visible = False
End Sub作者: imzues 時間: 2011-5-9 16:43
現在變點儲存格月曆跑不出來了!!作者: chin15 時間: 2011-5-9 18:57
If Target.Column <> 2 and Target.Column <> 3 Then Exit Sub作者: imzues 時間: 2011-5-10 07:29
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 2 Then
Calendar1.Visible = True
Calendar2.Visible = False
ElseIf Target.Column = 3 Then
Calendar2.Visible = True
Calendar1.Visible = False
Else
Calendar1.Visible = False
Calendar2.Visible = False
End If
End Sub作者: imzues 時間: 2011-5-10 10:23
太感謝了~我的問題解決了!!!作者: GBKEE 時間: 2011-5-10 15:50
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Calendar1.Visible = False
Calendar2.Visible = False
If Target(1).Column = 2 Then
Calendar1.Visible = True
ElseIf Target(1).Column = 3 Then
Calendar2.Visible = True
End If
End Sub