VBA를 통해 이미지 파일의 크기를 판정하여 크기를 설정하는 방법
TL;DR
  'NOTE: imagePath = イメージファイルのパス
  Dim shape As shape
  Set shape = ActiveSheet.Shapes.AddPicture(Filename:=imagePath, LinkToFile:=False, SaveWithDocument:=True, Left:=Selection.Left, Top:=Selection.Top, width:=-1, height:=-1)
  shape.LockAspectRatio = msoTrue
  pHeight = shape.height
  pWidth = shape.width
  maxHeightScale = 9
  maxWidthScale = 16
  If pHeight > pWidth Then
      'NOTE: すべてのセルの高さと幅が同じ前提
      shape.height = Cells(1, 1).height * maxHeightScale
  Else
      shape.width = Cells(1, 1).width * maxWidthScale
  End If
Reference
이 문제에 관하여(VBA를 통해 이미지 파일의 크기를 판정하여 크기를 설정하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/yazawa__k2/articles/20220314111211텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)