اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

صور متساوية المساحة


الردود الموصى بها

  • 3 weeks later...

أخي الكريم مستر أبو مرمر

إليك الكود التالي عله يفي بالغرض

Sub Insert_Pictures_Resize_All()
    Dim PicList()   As Variant
    Dim PicFormat   As String
    Dim Rng         As Range
    Dim sShape      As Shape
    Dim xColIndex   As Integer
    Dim xRowIndex   As Integer
    Dim lLoop       As Integer
    
    On Error Resume Next
    PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
    xColIndex = Application.ActiveCell.Column
    
    If IsArray(PicList) Then
        xRowIndex = Application.ActiveCell.Row
        For lLoop = LBound(PicList) To UBound(PicList)
            Set Rng = Cells(xRowIndex, xColIndex)
            Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
            xRowIndex = xRowIndex + 1
        Next lLoop
    End If
End Sub

قم بضبط ارتفاع الصفوف وعرض العمود كما تريد ..

حدد أول خلية في العمود المطلوب إدراج الصور فيه واضبط عرض العمود كما تريد ثم نفذ الكود ، سيظهر لك نافذة تختار منها المجلد الذي يحتوي الصور ثم حدد الصور المطلوب إدراجها

تقبل تحياتي

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information