私はこれが信じられないほど単純であることを知っています.私はそれを理解したり、他の場所で答えを見つけることができないようです. やりたいことは、選択した画像の範囲を取得することです。よろしくお願いします。
2651 次
1 に答える
1
ここでは、Excel シートで画像の左上と右下のセルを取得する方法のサンプルを示します。写真を選択する必要があります。
Sub test()
If (VBA.TypeName(Selection) = "Picture") Then
Dim pic As Excel.Picture
Set pic = Selection
Dim topLeft As Range
Set topLeft = pic.TopLeftCell
Debug.Print topLeft.Address
Dim bottomRight As Range
Set bottomRight = pic.BottomRightCell
Debug.Print bottomRight.Address
End If
End Sub
于 2013-07-31T13:48:07.893 に答える