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

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

 السلام عليكم اخواني الاعزاء انا عندي الكود ده في الاكسل علشان عند اضافة الاسم في الخليه يتم الظهار الصوره ولاكن المشكله عندي ان لايتم عرضالصوره بمجرد لصق الاسم ولاكن لازم اعمل دبل كلك بالماوس ثم اننتر علشان تظهر الصوره "المطلوب هوه عند لصق الاسم في الخليه يتم  ادراج الصور وشكرا"
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [A:A]) Is Nothing Then Exit Sub
If Target.Row Mod 20 = 0 Then Exit Sub
On Error GoTo son
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Target.Value & ".jpg").Select
Selection.Top = Target.Offset(0, 2).Top
Selection.Left = Target.Offset(0, 9).Left
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = Target.Offset(0, 2).Height
Selection.ShapeRange.Width = Target.Offset(0, 9).Width
Target.Offset(1, 0).Select
son:

Insert_Image-.rar

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

وعليكم السلام ورحمه الله وبركاته

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range
    Set KeyCells = Range("A1:C19")
    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
       Is Nothing Then
        On Error GoTo son
        ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Target.Value & ".jpg").Select
        Selection.Top = Target.Offset(0, 2).Top
        Selection.Left = Target.Offset(0, 9).Left
        Selection.ShapeRange.LockAspectRatio = msoFalse
        Selection.ShapeRange.Height = Target.Offset(0, 2).Height
        Selection.ShapeRange.Width = Target.Offset(0, 9).Width
        Target.Offset(1, 0).Select
son:
        Exit Sub    ' الكود الخاص بك
    End If
End Sub

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

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