Excel和VBscript给我无效的过程调用或参数
我正在写一个VBScript来创build一个日历,在这一行,我得到一个错误,说
With objExcel.Range("A1:U28") '.FormatConditions.Add xlCellValue, xlEqual, "=TODAY()" --- CRASH objExcel.Range("A1:U28").FormatConditions.Add xlCellValue,xlEqual,"=Today()" // CRASH .FormatConditions(1).Font.ColorIndex = 2 .FormatConditions(1).Interior.ColorIndex = 1 End With
错误:无效的过程调用或参数
在VBScript中,你必须显式地定义像xlCellValue
这样的xlCellValue
(并且你不能使用命名参数:=
)。 参考信息