如何将此形状参考代码分成2行? [英] How to break this shape reference code in 2 lines?
本文介绍了如何将此形状参考代码分成2行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此代码可以正常工作,但我的工作表已被阻塞,可供选择.
This code works fine, but i have my sheet BLOCKED for selections.
Sheets("sheet1").Shapes("test_" & i).Select
Selection.Formula = ""
...我要这样做:
Sheets("sheet1").Shapes("test_" & i).Formula = ""
但是我收到了对象错误,不接受此属性或方法.
But i got the object error to not accept this prop or method.
我想念什么?
推荐答案
公式
是 DrawingObject
属性的属性:
Sheets("sheet1").Shapes("test_" & i).DrawingObject.Formula = ""
对于activeX文本框(假设您要更改 LinkedCell
属性):
For an activeX textbox (assuming you want to change the LinkedCell
property):
Dim tb
Set tb = ActiveSheet.Shapes("test_" & i)
tb.OLEFormat.Object.LinkedCell = ""
这篇关于如何将此形状参考代码分成2行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文