“(空白)”的本地化

我想控制VBA中的切片器,并且想要检查是否select了空值,使用:

If slicerCache.SlicerItems.Item("(blank)").selected = True 

空值自动获得标签(blank) 。 这一切工作正常,直到在非英语的电脑上打开工作簿。 例如荷兰语的标签是(leeg) ,法语的标签是(vide)

我怎样才能得到这个标签的本地化版本?

在这个链接 2009年,问完全相同的问题,没有任何答案。

这是一个黑客,可能有一个更好的方法,但它是实用的,并适用于所有语言,只要“空白”总是代表有一个开始开放paren和结束密切paren,没有其他切片机列表中的值包含开始打开和结束的closures对。

 For Each si In SlicerCache.SlicerItems 'EDIT: I originally wrote this, but the one below is more precise 'If InStr(si.Name, "(") And InStr(si.Name, ")") Then If Left(si.Name,1) = "(" And Right(si.Name,1) = ")" Then If si.Selected = True Then MsgBox si.Name & " is set to True" End If Next