小弟不才,本來試4樓超級版主的檔案試不出來。後來發現原來
'Private Sub Worksheet_Activate() 後來發現原來Worksheet要加1
變成Private Sub Worksheet1_Activate() 這樣才跑得動
Private Sub Worksheet1_Activate()
With ComboBox1
For i = .ListCount - 1 To 0 Step -1
.RemoveItem i
Next
For Y = 1999 To 2100
.AddItem Y
Next
.Text = Year(Date)
End With
With ComboBox2
For i = .ListCount - 1 To 0 Step -1
.RemoveItem i
Next
For Y = 1 To 12
.AddItem Y
Next
.Text = Month(Date)
End With
End Sub作者: jsc0518 時間: 2017-3-19 19:08