AccessTr.neT
Sayfaya İsim Vermek - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: Microsoft Excel (https://accesstr.net/forum-microsoft-excel.html)
+--- Forum: Excel Cevaplanmış Soruları (https://accesstr.net/forum-excel-cevaplanmis-sorulari.html)
+--- Konu Başlığı: Sayfaya İsim Vermek (/konu-sayfaya-isim-vermek.html)

Sayfalar: 1 2 3 4 5


Re: Sayfaya İsim Vermek - m_demir - 01/05/2020

Çok teşekkürler Hocam ellerinize sağlık.

Hocam UserForm4 de Listbox da çoklu seçim yapıp silebiliyorum.

ListBox daki veriyi değiştirmek amaçlı TextBoxlara, ComboBoxa alamiyorum. Değiştirmek amacı ile ListBoxdaki satıra tıkladığımda hata veriyor.


RE: Sayfaya İsim Vermek - feraz - 01/05/2020

Bugün bakarım.

Döngü kurulur ve sorun çözülür.
Yani alttaki kod gibi.

İf listbox1.selected(i)= true then
...textoxa veri alma kodlar.
Exit for
Endf


RE: Sayfaya İsim Vermek - m_demir - 01/05/2020

Hocam bu kodları nereye eklemem gerekiyor.


RE: Sayfaya İsim Vermek - feraz - 01/05/2020

Yada on error resume next ekleyip deneyin.olmazsa bakarım bugün.

(01/05/2020, 04:46)m_demir yazdı: Hocam bu kodları nereye eklemem gerekiyor.
Önceki mesajımı uygulayın on error olanı.Diğerine bakarım sizin için karışık olabilir.


RE: Sayfaya İsim Vermek - m_demir - 01/05/2020

Hocam önceki mesajınızdaki kodu reye eklemem gerekiyor.


RE: Sayfaya İsim Vermek - feraz - 01/05/2020

Kodları en alttaki gibi yaptım.Önceden resim eklediğim çıklu seçim olayayını değiştirmemişsiniz.

Dim i As Long
For i = 0 To ListBox2.ListCount - 1
    If ListBox2.Selected(i) = True Then
        Sheets(ListBox2.List(i, 0)).Select
        Exit For
    End If
Next
Bunları ekledim.


'Dim txtbx As Control
'For Each txtbx In Me.Controls
'If TypeName(txtbx) = "TextBox" Then
'TextBox1.Value = ListBox2.Column(0)
'TextBox2.Value = ListBox2.Column(1)
'TextBox3.Value = ListBox2.Column(2)
'TextBox4 = Format(ListBox2.Column(3), "ss:dd")
'TextBox7 = Format(ListBox2.Column(4), "ss:dd")
'End If
'Next
Bunularıda pasif yaptım zaten tek sütun listbox.

Private Sub ListBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim i As Long

For i = 0 To ListBox2.ListCount - 1
    If ListBox2.Selected(i) = True Then
        Sheets(ListBox2.List(i, 0)).Select
        Exit For
    End If
Next

Unload UserForm2
If ListBox2.ListIndex < 0 Then Exit Sub
If ListBox2.RowSource = "" Then
       
    Else
        Range("A" & ListBox2.ListIndex + 1).Select
    End If
Yeni_mi = False
'Dim txtbx As Control
'For Each txtbx In Me.Controls
'If TypeName(txtbx) = "TextBox" Then
'TextBox1.Value = ListBox2.Column(0)
'TextBox2.Value = ListBox2.Column(1)
'TextBox3.Value = ListBox2.Column(2)
'TextBox4 = Format(ListBox2.Column(3), "ss:dd")
'TextBox7 = Format(ListBox2.Column(4), "ss:dd")
'End If
'Next
If ListBox2.RowSource = "" Then
        Range("A" & ListBox2.ListIndex + 1).Select
    Range("A65535").End(xlUp).Offset(1, 0).Select 'Son boþ satýra gider
    TextBox1.Text = [a1]

TextBox1.Text = [a1]
TextBox2.Text = [C2]
TextBox3.Text = [C3]
TextBox4.Text = [C4]
TextBox5.Text = [C5]
   
    End If
End Sub