已经搜索并没有找到任何解决方案。为了记录,我对 VB 比较陌生。这里的变量 minDate 是在过程之外的模块中声明的。我尝试在过程中声明它,使用 set、let 并将参数作为范围变量传递。没有什么。
Sub SocialTimeSinceFirstComment()
'
' SocialTimeSinceFirstComment Macro
'
Range("A11").Select
ActiveCell.FormulaR1C1 = "=MIN(SocialTransform!C[4])"
minDate = Application.WorksheetFunction.Min(Workbook.SocialTransform!.Range("c4").End(xlDown))