วิธีใส่รูปภาพใน excel ให้ขนาดพอดี อัตโนมัติ

Описание к видео วิธีใส่รูปภาพใน excel ให้ขนาดพอดี อัตโนมัติ

#วิธีใส่รูปภาพในexcelให้ขนาดพอดีอัตโนมัติ #วิธีแทรกรูปภาพในexcelให้มีขนาดพอดีกับเซลล์โดยอัตโนมัติ #excel #microsoftexcel #ใส่รูปให้ได้พอดีในexcel #แทรกรูปอัตโนมัติในexcel
โค้ดโปรแกรม:
Dim sPicture As String, pic As Picture

sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "please select picture as you want")

If sPicture = "False" Then Exit Sub

Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
.ShapeRange.LockAspectRatio = msoFalse
.Height = ActiveCell.Height
.Width = ActiveCell.Width
.Top = ActiveCell.Top
.Left = ActiveCell.Left
.Placement = xlMoveAndSize
End With

Set pic = Nothing

Комментарии

Информация по комментариям в разработке