Soru TextBox Değerini Başka Sayfada Birleştirilmiş Hücrelere Aktarma

Katılım
30 Mart 2010
Mesajlar
240
Excel Vers. ve Dili
2007,2010,2013
Altın Üyelik Bitiş Tarihi
29-05-2021
Merhaba,

Userform üzerinden texboxlara veri girişi yapıyorum. Sonra ilgili sayfayı buluyorum. Ama ilgili sayfada ilgili yerlere textbox değerini yazdıramıyorum. Hücreler birleştirilmiş hücreler olduğundan sorun yaratıyordur diye düşündüm fakat hücreleri ayırmama rağmen yazdıramadım. Önerileriniz nelerdir?
Teşekkürler.

Kod:
Private Sub CommandButton_isduz_Click()
On Error Resume Next
If Trim(Me.ComboBox_cay.Value) = "Seçiniz" Then
  Me.ComboBox_cay.SetFocus
  MsgBox "Çalışma Dönemi için Ay Seçmelisiniz."
  Exit Sub
End If
If Trim(Me.ComboBox_cdurum.Value) = "Seçiniz" Then
  Me.ComboBox_cdurum.SetFocus
  MsgBox "Çalışma Durumunu Seçmelisiniz."
  Exit Sub
End If
satir_no = ListBox3.ListIndex + 4
Sayfa6.Range("H" & satir_no).Value = ComboBox_cyil.Value & " " & ComboBox_cay.Value & " Döneminde " & ComboBox_cdurum.Value
syf3 = Sayfa6.Range("L" & satir_no).Value
Sheets(syf3).Range("B32").Value = TextBox_isduz1.Text
Sheets(syf3).Range("L7").Value = TextBox_isduz2.Text
Sheets(syf3).Range("L8").Value = TextBox_isduz3.Text
Sheets(syf3).Range("L11").Value = TextBox_isduz4.Text
Sheets(syf3).Range("L12").Value = TextBox_isduz5.Text
Sheets(syf3).Range("L13").Value = TextBox_isduz6.Text
Sheets(syf3).Range("L14").Value = TextBox_isduz7.Text
Sheets(syf3).Range("L15").Value = TextBox_isduz8.Text
Sheets(syf3).Range("L16").Value = TextBox_isduz9.Text
Sheets(syf3).Range("L17").Value = TextBox_isduz10.Text
Sheets(syf3).Range("L18").Value = TextBox_isduz11.Text
Sheets(syf3).Range("L19").Value = TextBox_isduz12.Text
Sheets(syf3).Range("L20").Value = TextBox_isduz13.Text
Sheets(syf3).Range("L21").Value = TextBox_isduz14.Text
Sheets(syf3).Range("M41").Value = TextBox_isduz15.Text
Sheets(syf3).Range("M42").Value = TextBox_isduz16.Text
Sheets(syf3).Range("M43").Value = TextBox_isduz17.Text
Sheets(syf3).Range("M44").Value = TextBox_isduz18.Text
Sheets(syf3).Range("M45").Value = TextBox_isduz19.Text
Sheets(syf3).Range("Z41").Value = TextBox_isduz20.Text
Sheets(syf3).Range("Z42").Value = TextBox_isduz21.Text
Sheets(syf3).Range("Z43").Value = TextBox_isduz22.Text
Sheets(syf3).Range("Z44").Value = TextBox_isduz23.Text
Sheets(syf3).Range("Z45").Value = TextBox_isduz24.Text
Sheets(syf3).Range("AW39").Value = TextBox_isduz25.Text
Sheets(syf3).Range("AW40").Value = TextBox_isduz26.Text
Sheets(syf3).Range("AW41").Value = TextBox_isduz27.Text
Sheets(syf3).Range("AW42").Value = TextBox_isduz28.Text
Sheets(syf3).Range("AW43").Value = TextBox_isduz29.Text
Sheets(syf3).Range("AW44").Value = TextBox_isduz30.Text
Sheets(syf3).Range("AW45").Value = TextBox_isduz31.Text
Sheets(syf3).Range("AK39").Value = ComboBox_kbitum.Text

UserForm_Initialize
End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,748
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Kodların başındaki On Error Resume Next satırını silip deneyin. Hata veren satırı paylaşın. Bu kod satırı bazen sorunları aşıyor gibi gözükse de dikkatli ve kontrollü kullanmak gerekiyor.

Yine çözüm olmazsa örnek dosya paylaşınız.
 
Katılım
30 Mart 2010
Mesajlar
240
Excel Vers. ve Dili
2007,2010,2013
Altın Üyelik Bitiş Tarihi
29-05-2021
Merhaba, On Error Resume Next'i kapatınca hiç hata almadım. satir_no değişkeninin altında Sayfa6 ile başlayan kod satırını sona taşıdım sorun çözüldü.

Teşekkürler.

Kod:
Private Sub CommandButton_isduz_Click()
On Error Resume Next
If Trim(Me.ComboBox_cay.Value) = "Seçiniz" Then
  Me.ComboBox_cay.SetFocus
  MsgBox "Çalışma Dönemi için Ay Seçmelisiniz."
  Exit Sub
End If
If Trim(Me.ComboBox_cdurum.Value) = "Seçiniz" Then
  Me.ComboBox_cdurum.SetFocus
  MsgBox "Çalışma Durumunu Seçmelisiniz."
  Exit Sub
End If
satir_no = ListBox3.ListIndex + 4
syf3 = Sayfa6.Range("L" & satir_no).Value
Sheets(syf3).Range("B32").Value = TextBox_isduz1.Text
Sheets(syf3).Range("L7").Value = TextBox_isduz2.Text
Sheets(syf3).Range("L8").Value = TextBox_isduz3.Text
Sheets(syf3).Range("L11").Value = TextBox_isduz4.Text
Sheets(syf3).Range("L12").Value = TextBox_isduz5.Text
Sheets(syf3).Range("L13").Value = TextBox_isduz6.Text
Sheets(syf3).Range("L14").Value = TextBox_isduz7.Text
Sheets(syf3).Range("L15").Value = TextBox_isduz8.Text
Sheets(syf3).Range("L16").Value = TextBox_isduz9.Text
Sheets(syf3).Range("L17").Value = TextBox_isduz10.Text
Sheets(syf3).Range("L18").Value = TextBox_isduz11.Text
Sheets(syf3).Range("L19").Value = TextBox_isduz12.Text
Sheets(syf3).Range("L20").Value = TextBox_isduz13.Text
Sheets(syf3).Range("L21").Value = TextBox_isduz14.Text
Sheets(syf3).Range("M41").Value = TextBox_isduz15.Text
Sheets(syf3).Range("M42").Value = TextBox_isduz16.Text
Sheets(syf3).Range("M43").Value = TextBox_isduz17.Text
Sheets(syf3).Range("M44").Value = TextBox_isduz18.Text
Sheets(syf3).Range("M45").Value = TextBox_isduz19.Text
Sheets(syf3).Range("Z41").Value = TextBox_isduz20.Text
Sheets(syf3).Range("Z42").Value = TextBox_isduz21.Text
Sheets(syf3).Range("Z43").Value = TextBox_isduz22.Text
Sheets(syf3).Range("Z44").Value = TextBox_isduz23.Text
Sheets(syf3).Range("Z45").Value = TextBox_isduz24.Text
Sheets(syf3).Range("AW39").Value = TextBox_isduz25.Text
Sheets(syf3).Range("AW40").Value = TextBox_isduz26.Text
Sheets(syf3).Range("AW41").Value = TextBox_isduz27.Text
Sheets(syf3).Range("AW42").Value = TextBox_isduz28.Text
Sheets(syf3).Range("AW43").Value = TextBox_isduz29.Text
Sheets(syf3).Range("AW44").Value = TextBox_isduz30.Text
Sheets(syf3).Range("AW45").Value = TextBox_isduz31.Text
Sheets(syf3).Range("AK39").Value = ComboBox_kbitum.Text
Sayfa6.Range("H" & satir_no).Value = ComboBox_cyil.Value & " " & ComboBox_cay.Value & " Döneminde " & ComboBox_cdurum.Value
UserForm_Initialize
End Sub
 
Üst