错误设置范围隐藏在Excel 2003中,而不是在2000中 [英] Error setting range to hidden in Excel 2003, not in 2000
问题描述
大家好,
我遇到问题,当我尝试通过VBA在Excel中为命名区域设置隐藏属性时,我收到以下错误:
错误1004无法设置范围类的隐藏属性
但是,这仅适用于使用Excel 2003的计算机,而不适用于使用Excel 2000的计算机。
代码示例:
范围(" nmRevisions"。。选择
如果Selection.EntireRow.Hidden = True那么
Selection.EntireRow.Hidden = False
Else:Selection.EntireRow.Hidden = True
End If
命名范围有效。有什么想法吗?
谢谢,
DonC
任何人??
Hi All,
I'm having a problem where I recieve the following error when trying to set the hidden property for a named range in Excel via VBA:
Error 1004 Unable to set the hidden property of the range class
However, this is only occuring on machines with Excel 2003, not on machines with Excel 2000.
Code example:
Range("nmRevisions").Select
If Selection.EntireRow.Hidden = True Then
Selection.EntireRow.Hidden = False
Else: Selection.EntireRow.Hidden = True
End If
The named range is valid. Any thoughts?
Thanks,
DonC
Anybody??
这篇关于错误设置范围隐藏在Excel 2003中,而不是在2000中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!