【发布时间】:2013-06-05 19:31:02
【问题描述】:
以下代码片段在英文版 Excel 中运行正常,但是当尝试在葡萄牙文版 Excel 中的同一工作簿中运行此代码时,会出错。
' Add color bars on every other row - attempt to make list
' easier to read.
' "PlaceAt" is a worksheet range passed into the function
With Range(PlaceAt.offset(1, 0), PlaceAt.offset(i + 1, 7))
.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)=1"
.FormatConditions(1).Interior.ColorIndex = 20
End With
我认为问题在于,在葡萄牙语中,ROW 函数拼写为 LIN(不确定 MOD 函数是什么),并且由于该函数是使用 vba 插入的,因此 Excel 的翻译函数没有机会翻译打开文档时的函数名称。
有什么想法吗?
【问题讨论】: