Đây là đoạn mã thu được = macro!
Sub GhiHinh()
' Macro recorded 10/13/2005 by LeThi Thom
'1Cho hiện Thanh ToolBar:
Application.CommandBars("Picture").Visible = True
'2 Insert ảnh thứ nhất & chỉnh kích thước nhỏ lại
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg" _
).Select
Selection.ShapeRange.ScaleHeight 0.23, msoFalse, msoScaleFromTopLeft
'3 Insert ảnh thứ nhì & chỉnh kích thước giảm chiều cao:
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg" _
).Select
Selection.ShapeRange.ScaleHeight 0.8, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.72, msoFalse, msoScaleFromBottomRight
'4 Xóa thử một hình trước, sau khi giảm kích thước H2 để thấy H1
ActiveSheet.Shapes("Picture 1").Select
Selection.Delete
End Sub
Không nói ngoa đâu nha!
Thư mục chứa hình ở mỗi máy có thể # nhau - Lưu ý!