user form ile yeni sayfa

Katılım
1 Aralık 2017
Mesajlar
222
Excel Vers. ve Dili
Microsoft Office 365 ProPlus
Altın Üyelik Bitiş Tarihi
18-01-2025
merhabalar

aşağıda paylaştıgım koddakı sorunu çözemedim. komut yeni sayfayi istediğim isim ile oluşturuyor fakat safya yı seçtiremedim yani yani oluşturdugum sayfaya veri aktaramıyorum sayfa boş kalıyor. _________ ile böldüğüm yersen sonrası sorunlu sanırım. yardımlarınız beklıyorum.

Kod:
'__________________YENİ KAYIT_________________
Private Sub yeni_Click()


Dim sor As String, ad As String, s As Byte

    ad = TextBox2.Text
    If ad = "" Then
    MsgBox " Lütfen sayfa ismi belirtin", vbCritical, "...:::Ömür ÇAKIR:::..."
    Exit Sub
    Else
    s = 0
    On Error Resume Next
    s = Len(Sheets("" & ad & "").Name)
    If s > 0 Then Exit Sub
    Sheets.Add.Name = ad
    End If
  '___________________________________________________________
   Dim sh As Worksheet

sayfa = TextBox2.Text

    Set sh = ThisWorkbook.Sheets(sayfa)
    Application.DisplayAlerts = False
    
    
    sh.Cells(A1).Value = "Op No"
    sh.Cells(B1).Value = "Operasyon Adı"
    sh.Cells(C1).Value = "Adet"
    sh.Cells(D1).Value = "İmalat Çeliği (Kg)    "
    sh.Cells(E1).Value = "Soğuk İşTakım Çeliği (Kg)"
    sh.Cells(F1).Value = "Malzeme Maliyeti "
    sh.Cells(G1).Value = "Sarf malzeme  "
    sh.Cells(H1).Value = "Isıl işlem Maliyeti"
    sh.Range(I1).Value = "KUR"
    If Me.TextBox219.Value = "" Then
    Me.TextBox219.Value = InputBox("Lütfen KUR Giriniz", , , , , , "..::Ömür ÇAKIR::..")
    Else
    sh.Range(I2).Value = Me.TextBox219.Value
    End If
    sh.Range(J1).Value = "ÇARPAN"
    If Me.TextBox221.Value = "" Then
    Me.TextBox221.Value = InputBox("Lütfen ÇARPAN Giriniz", , , , , , "..::Ömür ÇAKIR::..")
    Else
    sh.Range(J2).Value = Me.TextBox221.Value
    End If
    sh.Range(K1).Value = "TARİH"
    If Me.TextBox220.Value = "" Then
    Me.TextBox220.Value = InputBox("Lütfen TARİH Giriniz", , , , , , "..::Ömür ÇAKIR::..")
    Else
    sh.Range(K2).Value = Me.TextBox220.Value
    End If
    For txt = 33 To 62
        If Val(Controls("TextBox" & txt)) > 0 Then
            deg = deg + Val(Controls("TextBox" & txt))
            
      
        End If
    Next
    

For txt = 33 To 62
        If Val(Controls("TextBox" & txt)) > 0 Then
            deg = deg + Val(Controls("TextBox" & txt))
        End If
    Next
    TextBox214 = deg




    Call yenile
    Call Refres
End Sub
 

Erdem Akdemir

Destek Ekibi
Destek Ekibi
Katılım
4 Mayıs 2007
Mesajlar
3,638
Excel Vers. ve Dili
2016 PRO TÜRKÇE-İNG. 64 BİT
Merhaba,

Cells yönteminde Cells(A1) şeklinde kullanamazsınız. Cells yönteminde satır ve sütun numarası ayrıca değişken yada sabit olarak verilmelidir.
Range yönteminde ise hücreler çift tırnak içinde yazılmalıdır. Range("A1") gibi.
 
Katılım
1 Aralık 2017
Mesajlar
222
Excel Vers. ve Dili
Microsoft Office 365 ProPlus
Altın Üyelik Bitiş Tarihi
18-01-2025
hocam hi. dikkat etmemişim teşekkurler nasıl gözden kaçırdım orayı :d
 
Üst