- Tham gia
- 22/7/14
- Bài viết
- 355
- Được thích
- 31
Tôi có dùng đoạn Code này đùng để chèn ảnh vào 1 ô
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, [B3:B1002]) Is Nothing Then
Dim vFile
vFile = Application.GetOpenFilename("All Pictures, *.bmp;*.jpg;*.jpeg;*.png;*.gif")
If TypeName(vFile) = "String" Then
With ActiveCell
ActiveSheet.Shapes.AddPicture(CStr(vFile), msoFalse, msoTrue, .Left, .Top, .Width, .Height).Placement = xlMoveAndSize
End With
End If
End If
End Sub
Code ở trên khi chèn ảnh vào thì nó nằm trọn vẹn trong 1ô . Bây giờ tôi muốn chiều cao của nó hạ xuống 1 chút ( ScaleHeight 0.83 ) thì phải làm sao

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, [B3:B1002]) Is Nothing Then
Dim vFile
vFile = Application.GetOpenFilename("All Pictures, *.bmp;*.jpg;*.jpeg;*.png;*.gif")
If TypeName(vFile) = "String" Then
With ActiveCell
ActiveSheet.Shapes.AddPicture(CStr(vFile), msoFalse, msoTrue, .Left, .Top, .Width, .Height).Placement = xlMoveAndSize
End With
End If
End If
End Sub
Code ở trên khi chèn ảnh vào thì nó nằm trọn vẹn trong 1ô . Bây giờ tôi muốn chiều cao của nó hạ xuống 1 chút ( ScaleHeight 0.83 ) thì phải làm sao


