替代Excel 2010中的图片集 [英] Alternative to the Pictures collection in Excel 2010
本文介绍了替代Excel 2010中的图片集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是 xls 文件中的一些代码。在Excel 2010它不工作。我在对象资源管理器中找不到图片
的集合
Here is some code from an xls file. In Excel 2010 it doesn't work. I can't find the collection Pictures
in the object explorer
Private Sub Worksheet_Calculate()
Dim oPic As Picture
'make them invisible
For Each oPic In Me.Pictures
If Left(oPic.Name, 2) = "jq" Then
oPic.Visible = False
End If
Next
end sub
等效的2010年代码将是什么?
What would the equivalent 2010 code be?
推荐答案
使用此循环Excel中的图片
Use this to loop through pictures in Excel
Sub Sample()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
Debug.Print shp.Name
End If
Next
End Sub
这篇关于替代Excel 2010中的图片集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文