Excel上的错误424

时间:2013-12-22 02:06:33

标签: excel vba

我正在使用,我尝试运行此命令,然后获得424 Error...。代码非常简单,但我找不到解决方案。

Private Sub Run_Click()    
  Dim Weekly As Worksheet
  Set Weekly = ThisWorkbook.Sheets("Weekly")      

  Todaydate = Range("D4").Value  
  foo = WorksheetFuncton.Match(Todaydate, Weekly.Range("A1489:A1499"), 0)  
End Sub

编辑

我现在正在Runtime error 1004

Private Sub Run_Click()    
  Dim Weekly As Worksheet
  Set Weekly = ThisWorkbook.Sheets("Weekly")      

  Todaydate = Range("D4").Value  
  foo = WorksheetFunction.Match(Todaydate, Weekly.Range("A1489:A1499"), 0) 
End Sub

修改

修正了它!

我正在捣乱一个“.Value”

foo = WorksheetFunction.Match(Todaydate,Weekly.Range(“A1489:A1499”)。Value,0)

1 个答案:

答案 0 :(得分:5)

检查拼写:

上的WorkSheetFunct i