این فایل اکسل مربوط به بزرگ نمایی تصویر هست که یکی از دوستان زحمت کشیدن و این کد را برای من نوشتن اما در هنگام اجرا تصویر در جای قبلی خودش جا نمیگیره . باید جکار کرد تا حل بشه؟
بزرگنمایی تصویر در اکسل به کمک vba
Collapse
X
-
Resize_Picture
سلام دوست عزیز
در کدی که براتون نوشتند کافیه سایز عکس رو کمی کوچکتر کنید مثلاً : big=2.7کد:Sub Resize_Picture() Dim shp As Shape Dim big As Single, small As Single Dim shpDouH As Double, shpDouOriH As Double big = 2.72 small = 1 On Error Resume Next Set shp = ActiveSheet.Shapes(Application.Caller) With shp shpDouH = .Height .ScaleHeight 1, msoTrue, msoScaleFromTopLeft shpDouOriH = .Height If Round(shpDouH / shpDouOriH, 2) = big Then .ScaleHeight small, msoTrue, msoScaleFromTopLeft .ScaleWidth small, msoTrue, msoScaleFromTopLeft .ZOrder msoSendToBack Else .ScaleHeight big, msoTrue, msoScaleFromTopLeft .ScaleWidth big, msoTrue, msoScaleFromTopLeft .ZOrder msoBringToFront End If End With End Sub
موفق باشید.
فایل های پیوست شده[CENTER][B][SIZE=5][COLOR=#006600][FONT=georgia][COLOR=#800000]!With [/COLOR][/FONT][/COLOR][COLOR=#006600][FONT=georgia]God [/FONT][/COLOR][COLOR=#006600][FONT=georgia][COLOR=#800000]all [/COLOR][/FONT][/COLOR][COLOR=#800000][FONT=georgia]things are [/FONT][/COLOR][COLOR=#006600][FONT=georgia]possible[/FONT][/COLOR][/SIZE][/B][B][FONT=Tahoma]
[/FONT][/B][/CENTER]
[CENTER][B][FONT=Tahoma] [IMG]http://forum.exceliran.com/attachment.php?attachmentid=5334&d=1419428336[/IMG]
[/FONT][/B][SIZE=1][FONT=Tahoma][B][FONT=Tahoma]
[/FONT][/B][/FONT][/SIZE]
[/CENTER] -
افزایش عرض ستون
البته اگر قصد ندارید بزرگنمایی تصویر رو تغییر بدید می تونید عرض ستون a رو افزایش بدید.
موفق باشید.
[CENTER][B][SIZE=5][COLOR=#006600][FONT=georgia][COLOR=#800000]!With [/COLOR][/FONT][/COLOR][COLOR=#006600][FONT=georgia]God [/FONT][/COLOR][COLOR=#006600][FONT=georgia][COLOR=#800000]all [/COLOR][/FONT][/COLOR][COLOR=#800000][FONT=georgia]things are [/FONT][/COLOR][COLOR=#006600][FONT=georgia]possible[/FONT][/COLOR][/SIZE][/B][B][FONT=Tahoma]
[/FONT][/B][/CENTER]
[CENTER][B][FONT=Tahoma] [IMG]http://forum.exceliran.com/attachment.php?attachmentid=5334&d=1419428336[/IMG]
[/FONT][/B][SIZE=1][FONT=Tahoma][B][FONT=Tahoma]
[/FONT][/B][/FONT][/SIZE]
[/CENTER]کامنت



کامنت