• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Daha kısa kod yazabilir miyim?

Katılım
9 Kasım 2010
Mesajlar
6
Excel Vers. ve Dili
EXCEL 2007
SELAM ARKADAŞLAR,
AŞAĞIDAKİ KODLARI NASIL KISA YAZABİLİRİM.
DAHA BÖYLE YÜZ KADAR RESİM YERLEŞTİRMEM GEREKİYOR. YARDIM EDERSENİZ SEVİNİRİM. SAYGILAR. (EKLİ DOSYA ŞİFRESİ:t)

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
Me.Pictures("Picture 32").Visible = False
With Range("c1")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
Exit For
End If
Next oPic
End With
With Range("c3")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
Exit For
End If
Next oPic
End With
With Range("c6")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
Exit For
End If
Next oPic
End With

........

End Sub
 

Ekli dosyalar

  • M_L.xls
    M_L.xls
    138.5 KB · Görüntüleme: 4
Kod:
      For i = 5 To [b65536].End(3).Row
        With Cells(i, 3)
                    For Each oPic In Me.Pictures
                If oPic.Name = .Text Then
                    oPic.Visible = True
                    oPic.Top = .Top
                    oPic.Left = .Left
                    Exit For
                End If
            Next oPic
        End With
        Next
şeklinde deneyin.
 
Geri
Üst