返回列表 上一主題 發帖

請問2010輸入日期

本帖最後由 zamamilo 於 2012-5-3 23:55 編輯

高手大大,

  我的版本是2010版也有安裝access2010
但執行時會出現

執行階段錯誤’424’
此處需要物件


我的程式如下
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case ActiveCell.Address
    Case Is = "$I$5"
        Calendar1.Visible = True: Calendar1 = Date
        Calendar1.Top = ActiveCell.Top
        Calendar1.Left = ActiveCell.Left
    Case Is = "$B$76"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left
        ActiveCell.Select
    Case Is = "$B$77"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left
    Case Is = "$B$78"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left
    Case Is = "$B$79"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left
    Case Is = "$B$80"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left
    Case Is = "$B$81"
        Calendar2.Visible = True
        Calendar2.Top = ActiveCell.Top
        Calendar2.Left = ActiveCell.Left

End Select

可否煩請大大協助小弟

忘了跟各位大大報告,這段程式當時是在 excel 2003版下完成且執行ok的,但到了excel2010時才會出現
執行階段錯誤’424’
此處需要物件

不知要改那裡。能否請高手大大指導一下。

TOP

        靜思自在 : 是非當教育,讚美作警惕。
返回列表 上一主題