• DİKKAT

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

İmage nesnesine resim yükleme problemi

  • Konbuyu başlatan Konbuyu başlatan bravo64
  • Başlangıç tarihi Başlangıç tarihi
Katılım
21 Eylül 2005
Mesajlar
184
Excel Vers. ve Dili
ofis 365 İngilizce
İyi akşamlar arkadaşlar..Tüm forumda arama yaptım ama tam cevabını bulamadığım sorunum şu;
userformun üzerinde bilgilerin çekildiği textboxlar ve 4 adet image nesnem var.listbox'ı tıkladığımda ilgili numrayla ilgili bilgiler akıyor ve image nesnelerinede seçimle ilgili resimler geliyor sorun yok. herbir image nesnesini tıkladığımda imageyi büyüten kodumda çalışıyor.ancak tekrar imageyi küçültüp listboxtan başka bir referans numarasını tıkladığımda küçültme/büyütme yaptığım imageye resim gelmiyor,eski resim kalıyor.Diğer imagelerde sorun yok.
kodlar şöyle;

Private Sub ListBox7_Click()
Dim s1 As Worksheet
Dim t As Integer
ListBox7.Visible = False

Set s1 = Sheets("data")
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
Image3.Picture = LoadPicture("")
Image4.Picture = LoadPicture("")

s1.[AW1] = ListBox7.Value
For t = 4 To s1.[b65536].End(3).Row
If s1.Cells(t, "b") = s1.[AW1].Value Then
Sheets("data").[ax1] = Sheets("data").Cells(t, "a") + 3
TextBox1 = ListBox7.Value
TextBox20 = Sheets("data").Cells(t, "a")
TextBox14 = Sheets("data").Cells(t, "c")
TextBox15 = Sheets("data").Cells(t, "D")
TextBox16 = Sheets("data").Cells(t, "e")
TextBox2 = Sheets("data").Cells(t, "f")
TextBox3 = Sheets("data").Cells(t, "g")
TextBox17 = Sheets("data").Cells(t, "h")
TextBox18 = Sheets("data").Cells(t, "ı")
TextBox4 = Sheets("data").Cells(t, "j")
TextBox19 = Sheets("data").Cells(t, "t")
TextBox5 = Sheets("data").Cells(t, "k")
TextBox6 = Sheets("data").Cells(t, "l")
TextBox7 = Sheets("data").Cells(t, "m")
TextBox8.Text = Format(Sheets("data").Cells(t, "n").Value, "dd.mm.yyyy")
TextBox13 = Sheets("data").Cells(t, "o")
TextBox9 = Sheets("data").Cells(t, "p")
TextBox10.Text = Format(Sheets("data").Cells(t, "q").Value, "dd.mm.yyyy")
TextBox11 = Sheets("data").Cells(t, "r")
TextBox12 = Sheets("data").Cells(t, "s")
End If
Next

On Error GoTo 5
Image1.Picture = LoadPicture("c:\koleksiyon\" & (ListBox7.Value) & ".jpg")
Image1.PictureSizeMode = fmPictureSizeModeZoom
Image2.Picture = LoadPicture("c:\koleksiyon\" & (ListBox7.Value) & 2 & ".jpg")
Image2.PictureSizeMode = fmPictureSizeModeZoom
Image3.Picture = LoadPicture("c:\koleksiyon\" & (ListBox7.Value) & 3 & ".jpg")
Image3.PictureSizeMode = fmPictureSizeModeZoom
Image4.Picture = LoadPicture("c:\koleksiyon\" & (ListBox7.Value) & 4 & ".jpg")
Image4.PictureSizeMode = fmPictureSizeModeZoom
TextBox20.SetFocus

5
Exit Sub
TextBox20.SetFocus
End Sub

büyütüp küçültme için ise;

Private Sub Image4_Click()
If Image4.Width > 128.25 Then
Image4.Width = 128.25
Image4.Height = 139.5
Image4.Top = 216
Image4.Left = 594

TextBox15.Visible = True
TextBox18.Visible = True
Label26.Visible = True
CommandButton3.Visible = True
CommandButton6.Visible = True
Label20.Visible = True
Label19.Visible = True
Label8.Visible = True
Label27.Visible = True
TextBox16.Visible = True
CommandButton5.Visible = True
CommandButton4.Visible = True
CommandButton7.Visible = True
CommandButton8.Visible = True
CommandButton1.Visible = True
TextBox19.Visible = True
Label22.Visible = True
Image3.Visible = True
Label21.Visible = True
Label23.Visible = True
CommandButton9.Visible = True
Exit Sub
End If
If Image4.Width = 128.25 Then
Image4.Width = 128.25 * 3
Image4.Height = 139.5 * 3
Image4.Top = 34
Image4.Left = 594
Label27.Visible = False
TextBox15.Visible = False
TextBox18.Visible = False
Label26.Visible = False
CommandButton3.Visible = False
CommandButton6.Visible = False
Label20.Visible = False
Label19.Visible = False
Label8.Visible = False
Label23.Visible = False
TextBox16.Visible = False
CommandButton5.Visible = False
CommandButton4.Visible = False
CommandButton7.Visible = False
CommandButton8.Visible = False
CommandButton1.Visible = False
TextBox19.Visible = False
Label22.Visible = False
Image3.Visible = False
Label21.Visible = False
CommandButton9.Visible = False
End If
End Sub

ilginize teşekkür ederim..
 
Sadece küçültme işlemini yapan satırları Listbox click altında en başa da yazın.
 
Sayın Anemos teşekkürler öncelikle..Yalnız şu var,büyüttüğüm image tekrar tıkladığımda küçülüyor.Sorun ,ondan sonra başka bir referansı tıkladığımda(listboxda)herşey normal çalışıyor fakat küçültme-büyütme yaptığım imagede eski resim kalıyor.(userformumun üstündeki multipagede geçiş yaptığımda düzeliyor)
 
Bravo64,

Listbox ta tıklayınca veriler Textbox lara geliyor, bu kısma Me.Repaint komutunu kullan, diğer kodların arasına da kullanabilirsin.
Me.Repaint refresh yapma gibi bir komut.
Saygılar,
Tansu
 
image nesnesine resim yükleme problemi

Syın tarkan maalesef uine aynı..
 
Geri
Üst