• DİKKAT

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

Döngü kullanarak hücrelere veri atama ve şablon sayfası

gezgin-49

Altın Üye
Katılım
17 Ekim 2006
Mesajlar
669
Excel Vers. ve Dili
Türkçe 2003
Sayın Üstadlarım oluşturduğum userformda 309 adet TextBox var, Textbox sayısı fazla olunca döngü kullanmak zorundayım, fakat bir türlü başaramadım, sizden istediğim.
1-Textboxlara gireceğim veriyi önce "TABLO" sayfasında belirlediğim hücrelere atamasını,
2-Aynı verileri Data Sayfasına her bir kişi için bir sütun seçerek oraya kaydetmesini,örneğin A kişisi için A sütunu, B kişisi için B sütununu, (tekxtbox sayısı 309 olunca satır satır kaydetmek mümkün olmadı)
3-"TABLO" sayfasına kaydeti tıkladığımda Tablo Sayfası R2 hücresinde yazılı kişi adına (TextBox1) şablon sayfasını kullanarak yeni bir sayfa açılmasını ve bu kişiye ait tüm verileri buraya da kaydetmesini istiyorum.

Biraz fazla olduğumu biliyorum, ama yaklaşık 1 haftadır uğraşıyorum, bir türlü yapamadım, bu nedenle siz değerli üstadlarımın değerli zamanını çalmak zorunda kaldım, şimdiden ilgilenen tüm arkadaşlara teşekkür eder, saygılar sunarım.
Kod:
Private Sub CommandButton2_Click()

Set s2 = Sheets("Data")
a = s2.[A65536].End(3).Row + 1
For i = 1 To 72
s2.Cells(a, i) = Controls("TextBox" & i).Text
Next

Sheets("TABLO").Select
 Sheets("TABLO").Range("R2").Value = TextBox1.Text
 Sheets("TABLO").Range("BB2").Value = TextBox2.Text
 Sheets("TABLO").Range("BU81").Value = TextBox3.Text
 Sheets("TABLO").Range("R3").Value = TextBox4.Text
 Sheets("TABLO").Range("AD3").Value = TextBox5.Text
 Sheets("TABLO").Range("BB3").Value = TextBox6.Text
Sheets("TABLO").Range("E81").Value = TextBox7.Text
 Sheets("TABLO").Range("E80").Value = TextBox8.Text
 
  
Sheets("TABLO").Range("BU80").Value = TextBox9.Text
 Sheets("TABLO").Range("BU81").Value = TextBox10.Text
 Sheets("TABLO").Range("A12").Value = TextBox11.Text
 Sheets("TABLO").Range("AH12").Value = TextBox12.Text
 Sheets("TABLO").Range("BM12").Value = TextBox13.Text
  Sheets("TABLO").Range("A6").Value = TextBox13.Text
  Sheets("TABLO").Range("H6").Value = TextBox14.Text
  Sheets("TABLO").Range("N6").Value = TextBox15.Text
  Sheets("TABLO").Range("R6").Value = TextBox16.Text
  Sheets("TABLO").Range("AA6").Value = TextBox17.Text
  Sheets("TABLO").Range("AH6").Value = TextBox18.Text
  Sheets("TABLO").Range("AN6").Value = TextBox19.Text
  Sheets("TABLO").Range("AR6").Value = TextBox20.Text
  Sheets("TABLO").Range("BA6").Value = TextBox21.Text
  Sheets("TABLO").Range("BH6").Value = TextBox22.Text
  Sheets("TABLO").Range("BN6").Value = TextBox23.Text
  Sheets("TABLO").Range("BR6").Value = TextBox24.Text
  Sheets("TABLO").Range("A7").Value = TextBox25.Text
  Sheets("TABLO").Range("H7").Value = TextBox26.Text
  Sheets("TABLO").Range("N7").Value = TextBox27.Text
  Sheets("TABLO").Range("R7").Value = TextBox28.Text
  Sheets("TABLO").Range("AA7").Value = TextBox29.Text
  Sheets("TABLO").Range("AH7").Value = TextBox30.Text
  Sheets("TABLO").Range("AN7").Value = TextBox31.Text
  Sheets("TABLO").Range("AR7").Value = TextBox32.Text
  Sheets("TABLO").Range("BA7").Value = TextBox33.Text
  Sheets("TABLO").Range("BH7").Value = TextBox34.Text
  Sheets("TABLO").Range("BN7").Value = TextBox35.Text
  Sheets("TABLO").Range("BR7").Value = TextBox36.Text
  Sheets("TABLO").Range("A8").Value = TextBox37.Text
  Sheets("TABLO").Range("H8").Value = TextBox38.Text
  Sheets("TABLO").Range("N8").Value = TextBox39.Text
  Sheets("TABLO").Range("R8").Value = TextBox40.Text
  Sheets("TABLO").Range("AA8").Value = TextBox41.Text
  Sheets("TABLO").Range("AH8").Value = TextBox42.Text
  Sheets("TABLO").Range("AN8").Value = TextBox43.Text
  Sheets("TABLO").Range("AR8").Value = TextBox44.Text
  Sheets("TABLO").Range("BA8").Value = TextBox45.Text
  Sheets("TABLO").Range("BH8").Value = TextBox46.Text
  Sheets("TABLO").Range("BN8").Value = TextBox47.Text
  Sheets("TABLO").Range("BR8").Value = TextBox48.Text
  Sheets("TABLO").Range("A9").Value = TextBox49.Text
  Sheets("TABLO").Range("H9").Value = TextBox50.Text
  Sheets("TABLO").Range("N9").Value = TextBox51.Text
  Sheets("TABLO").Range("R9").Value = TextBox52.Text
  Sheets("TABLO").Range("AA9").Value = TextBox53.Text
  Sheets("TABLO").Range("AH9").Value = TextBox54.Text
  Sheets("TABLO").Range("AN9").Value = TextBox55.Text
  Sheets("TABLO").Range("AR9").Value = TextBox56.Text
  Sheets("TABLO").Range("BA9").Value = TextBox57.Text
  Sheets("TABLO").Range("BH9").Value = TextBox58.Text
  Sheets("TABLO").Range("BN9").Value = TextBox59.Text
  Sheets("TABLO").Range("BR9").Value = TextBox60.Text
  Sheets("TABLO").Range("A10").Value = TextBox61.Text
  Sheets("TABLO").Range("H10").Value = TextBox62.Text
  Sheets("TABLO").Range("N10").Value = TextBox63.Text
  Sheets("TABLO").Range("R10").Value = TextBox64.Text
  Sheets("TABLO").Range("AA10").Value = TextBox65.Text
  Sheets("TABLO").Range("AH10").Value = TextBox66.Text
  Sheets("TABLO").Range("AN10").Value = TextBox67.Text
  Sheets("TABLO").Range("AR10").Value = TextBox68.Text
  Sheets("TABLO").Range("BA10").Value = TextBox69.Text
  Sheets("TABLO").Range("BH10").Value = TextBox70.Text
  Sheets("TABLO").Range("BN10").Value = TextBox71.Text
  Sheets("TABLO").Range("BR10").Value = TextBox72.Text
 ………………………
  Sheets("TABLO").Range("KL").Value = TextBox309.Text

MsgBox "Kişisel Bilgileri Kaydetme İşlemi Başarı İle Tamamlandı.", vbOKOnly, "www.excel.web.tr "
End Sub
 
arkadaşlar yardımlarınızı bekliyorum, benim için çok önemli
 
Sayın Üstadlarım yardımlarınızı bekliyorum,
 
Geri
Üst