0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

テスト114

Posted at

Sub Test_Pic()

Dim shp As Shape
Dim str_Addr As String

With ThisWorkbook.Sheets("画像判定")
    
    'シート内に画像以外のオブジェクトが存在した場合(2個以上)は終了
    If .Shapes.Count > 1 Then
    
        MsgBox "○○ファイルには画像が2つ以上存在します。確認をお願いします。", _
                      vbCritical, "中止"
        Exit Sub
    
    End If
    
    For Each shp In .Shapes
        
        If shp.Type = msoPicture Then
            'シート内に画像がある場合、その画像の右下のセル番地を取得
            str_Addr = shp.BottomRightCell.Address
            MsgBox str_Addr
            Exit Sub
            
        End If
        
    Next shp

End With


End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?