Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 2010中图片集合的替代方案_Excel_Excel 2003_Excel 2010_Vba - Fatal编程技术网

Excel 2010中图片集合的替代方案

Excel 2010中图片集合的替代方案,excel,excel-2003,excel-2010,vba,Excel,Excel 2003,Excel 2010,Vba,下面是xls文件中的一些代码。在Excel 2010中,它不起作用。在对象资源管理器中找不到集合图片 Private Sub Worksheet_Calculate() Dim oPic As Picture 'make them invisible For Each oPic In Me.Pictures If Left(oPic.Name, 2) = "jq" Then

下面是xls文件中的一些代码。在Excel 2010中,它不起作用。在对象资源管理器中找不到集合图片

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代码是什么?

使用此代码在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中循环浏览图片

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

谢谢西德哈特。。。我说的对吗,这是xl最新版本的新版本?好的-所以图片集已经被删除,但形状一直都是好的?谢谢Siddharth。。。我说的对吗?这是xl最新版本的新版本?好-因此图片集合已被删除,但形状始终是好的?相关:相关: