Aktif olan hücre boyutuna göre resim ekler
Sub seçilen_hücreye_resim_ekle()
Dim sPicture As String, pic As Picture
Dim Target As Range
ChDir ThisWorkbook.Path
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _...
Deneyiniz.
Private Sub TextBox1_Change()
On Error Resume Next
ResimDosya = ThisWorkbook.Path & "\RESİM\" & TextBox1 & ".*"
If Dir(ResimDosya) = "" Then
Image1.Visible = False
Else
Image1.Visible = True
Image1.Picture = LoadPicture(ThisWorkbook.Path & "\RESİM\" & ResimDosya)
End If
End Sub
...Private Sub TextBox1_Change()
On Error Resume Next
ResimDosya = ThisWorkbook.Path & "\RESİM\" & TextBox1 & ".Jpg"
If Dir(ResimDosya) = "" Then
Image1.Visible = False
Else
Image1.Visible = True
Image1.Picture = LoadPicture(ThisWorkbook.Path & "\RESİM\" & TextBox1 & ".Jpg")
End If
End Sub
Merhaba , deneyiniz..
Sub Test()
Dim Resim
For Each Resim In Sheets("Sayfa1").Shapes
If Resim.Name = "Picture 7" Then
Resim.Copy
ActiveSheet.Paste Destination:=Cells(Cells(Rows.Count, 10).End(3).Row + 1, 10)
'Resim.Delete
End If...
Button üzerinde sağ tıklayın properties(özellikler) de picture ile istediğiniz resmi ekleyebilirsiniz.
Ancak hem yazı hem de resim olmaz ama resme yazı ekleyip öyle eklerseniz olur.
Kod ofis 2003 -2007-2016 da çalışıyor.
Private Sub CommandButton1_Click()
Dim Picture As Object
For Each Picture In ActiveSheet.Shapes
If TypeName(Picture.OLEFormat.Object) = "OLEObject" Then
If TypeName(Picture.OLEFormat.Object.Object) = "OptionButton" Then
If...
kod:
Private Sub CommandButton1_Click()
Dim Picture As Object
For Each Picture In ActiveSheet.Shapes
say = say + 1
Cells(say, 1) = Picture.Name
If TypeName(ActiveSheet.Shapes(Picture.Name).OLEFormat.Object.Object) = "OptionButton" Then
MsgBox...
...tek bir resim sığdırabilirsiniz örnek dosya ekte.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim sPicture As String, pic As Picture
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
...
...resimler geliyor. resmi olmayanlarda eski resim geliyor.
yenile sub tarzında bir sayfa yeniletme kullanıyorum ama oraya image3 deki eski resmi temizletemiyorum.
su kodu denedim olmadı
Me.Image3.Picture = LoadPicture ("")
listboxdan sectiğim urunun resmi yok ise image3 boş kalsın istiyorum.
merhaba
userfornda image3 e resim çağırmaya kalktıgımda invalid picture hatası veriyor. yardımcı olurmusunuz aşağıdaki kodda yol olarak gösterilen yerde resim mevcut
Me.Image3.Picture = LoadPicture(ThisWorkbook.Path & "\Resim Dosyaları\" & TextBox2.Value & ".JPG")
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.