11. Range("B1").Select 移動
12. For Each E In OLEObjects
13. If E.Name Like "ComboBox*" Then E.Object.Value = ""
14. Next
Range("B1").Select 到此
15. Application.EnableEvents = True
16.End Sub
DoEvents 將控制權交回作業系統,來處理 E.Object.Value = " " 的畫面
For Each E In OLEObjects
If E.Name Like "ComboBox*" Then E.Object.Value = " ": DoEvents
Next作者: steven 時間: 2010-6-11 17:02
了解..謝謝大熱心解說小弟由心感謝
尚有一事請教..
如Private Sub CommandButton2_Click()
執行後欲將CommandButton2暫時關閉而執行後要重新開啟CommandButton2執行後卻不行請大大指導.......
1.CommandButton2.Visible = False2.CommandButton4.Visible = TrueDim E As Object
Application.EnableEvents = False
ActiveWindow.SmallScroll Down:=24
Range("B3:F32").Select
Range("F32").Activate
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-24
Range("L232").Select
Selection.ClearContents
For Each E In OLEObjects
If E.Name Like "ComboBox*" Then E.Object.Value = " ": DoEvents
Next
Range("a1").Select
Application.EnableEvents = True
2.CommandButton2.Visible = True
End Sub作者: GBKEE 時間: 2010-6-11 19:59