• DİKKAT

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

textbox ile gizli sayfaya veri yazdırmak?

  • Konbuyu başlatan Konbuyu başlatan cenga03
  • Başlangıç tarihi Başlangıç tarihi
Katılım
3 Ocak 2009
Mesajlar
21
Excel Vers. ve Dili
Excel 2016
merhabalar

Veri girişi için bir userform tasarladım ve buradaki textbox lara girilen verileri excelde belirlediğim bir sayfaya yazdırmak istiyorum. Ancak verilerin aktarıldığı sayfaya kullanıcı tarafından ulaşılmamalı bunu nasıl sağlayabilirim?
 
Sayın cenga03,
Sorularınıza örnek bir dosya koymayı ihmal etmeyiniz.Gizli bir sayfaya veri yazılmasında sıkıntı yoktur zaten.Mesela aşağıdaki kod ile gizlenmiş olan Sayfa2'ye veri girişi yapılabilir.

Kod:
Sheets("Sayfa2").Range("A1") = 1

VBA sayfasına da şifre koyarsanız gizli sayfalar da gösterilemez.Yine de sıkıntı yaşarsanız gizli sayfaları kodun içinde önce visible=true sonra da visible=false yapabilirsiniz.
 
Ekteki dosyada Enerji_Giderleri adlı userforma veri girilip kaydet butonuna basıldığında DATA2 sayfasını bulamadığı için veri yazdıramadığı hatasını veriyor.
 

Ekli dosyalar

Sayın cenga03,
İlk satırı silin.Aşağıdaki gibi kullanın kodları:

Kod:
Private Sub CommandButton1_Click()
'Sheets("DATA2").Select
Sheets("DATA2").[B2] = TextBox1.Value
Sheets("DATA2").[C2] = TextBox2.Value
Sheets("DATA2").[D2] = TextBox3.Value
Sheets("DATA2").[E2] = TextBox4.Value
Sheets("DATA2").[F2] = TextBox5.Value
Sheets("DATA2").[G2] = TextBox6.Value
Sheets("DATA2").[H2] = TextBox7.Value
Sheets("DATA2").[I2] = TextBox8.Value
Sheets("DATA2").[J2] = TextBox9.Value
Sheets("DATA2").[K2] = TextBox10.Value
Sheets("DATA2").[L2] = TextBox11.Value
Sheets("DATA2").[M2] = TextBox12.Value
Sheets("DATA2").[B3] = TextBox13.Value
Sheets("DATA2").[C3] = TextBox14.Value
Sheets("DATA2").[D3] = TextBox15.Value
Sheets("DATA2").[E3] = TextBox16.Value
Sheets("DATA2").[F3] = TextBox17.Value
Sheets("DATA2").[G3] = TextBox18.Value
Sheets("DATA2").[H3] = TextBox19.Value
Sheets("DATA2").[I3] = TextBox20.Value
Sheets("DATA2").[J3] = TextBox21.Value
Sheets("DATA2").[K3] = TextBox22.Value
Sheets("DATA2").[L3] = TextBox23.Value
Sheets("DATA2").[M3] = TextBox24.Value
Sheets("DATA2").[B4] = TextBox25.Value
Sheets("DATA2").[C4] = TextBox26.Value
Sheets("DATA2").[D4] = TextBox27.Value
Sheets("DATA2").[E4] = TextBox28.Value
Sheets("DATA2").[F4] = TextBox29.Value
Sheets("DATA2").[G4] = TextBox30.Value
Sheets("DATA2").[H4] = TextBox31.Value
Sheets("DATA2").[I4] = TextBox32.Value
Sheets("DATA2").[J4] = TextBox33.Value
Sheets("DATA2").[K4] = TextBox34.Value
Sheets("DATA2").[L4] = TextBox35.Value
Sheets("DATA2").[M4] = TextBox36.Value
Sheets("DATA2").[B6] = TextBox37.Value
Sheets("DATA2").[C6] = TextBox38.Value
Sheets("DATA2").[D6] = TextBox39.Value
Sheets("DATA2").[E6] = TextBox40.Value
Sheets("DATA2").[F6] = TextBox41.Value
Sheets("DATA2").[G6] = TextBox42.Value
Sheets("DATA2").[H6] = TextBox43.Value
Sheets("DATA2").[I6] = TextBox44.Value
Sheets("DATA2").[J6] = TextBox45.Value
Sheets("DATA2").[K6] = TextBox46.Value
Sheets("DATA2").[L6] = TextBox47.Value
Sheets("DATA2").[M6] = TextBox48.Value
Sheets("DATA2").[B7] = TextBox49.Value
Sheets("DATA2").[C7] = TextBox50.Value
Sheets("DATA2").[D7] = TextBox51.Value
Sheets("DATA2").[E7] = TextBox52.Value
Sheets("DATA2").[F7] = TextBox53.Value
Sheets("DATA2").[G7] = TextBox54.Value
Sheets("DATA2").[H7] = TextBox55.Value
Sheets("DATA2").[I7] = TextBox56.Value
Sheets("DATA2").[J7] = TextBox57.Value
Sheets("DATA2").[K7] = TextBox58.Value
Sheets("DATA2").[L7] = TextBox59.Value
Sheets("DATA2").[M7] = TextBox60.Value
Sheets("DATA2").[B8] = TextBox61.Value
Sheets("DATA2").[C8] = TextBox62.Value
Sheets("DATA2").[D8] = TextBox63.Value
Sheets("DATA2").[E8] = TextBox64.Value
Sheets("DATA2").[F8] = TextBox65.Value
Sheets("DATA2").[G8] = TextBox66.Value
Sheets("DATA2").[H8] = TextBox67.Value
Sheets("DATA2").[I8] = TextBox68.Value
Sheets("DATA2").[J8] = TextBox69.Value
Sheets("DATA2").[K8] = TextBox70.Value
Sheets("DATA2").[L8] = TextBox71.Value
Sheets("DATA2").[M8] = TextBox72.Value
Sheets("DATA2").[B11] = TextBox73.Value
Sheets("DATA2").[C11] = TextBox74.Value
Sheets("DATA2").[D11] = TextBox75.Value
Sheets("DATA2").[E11] = TextBox76.Value
Sheets("DATA2").[F11] = TextBox77.Value
Sheets("DATA2").[G11] = TextBox78.Value
Sheets("DATA2").[H11] = TextBox79.Value
Sheets("DATA2").[I11] = TextBox80.Value
Sheets("DATA2").[J11] = TextBox81.Value
Sheets("DATA2").[K11] = TextBox82.Value
Sheets("DATA2").[L11] = TextBox83.Value
Sheets("DATA2").[M11] = TextBox84.Value
Sheets("DATA2").[B12] = TextBox85.Value
Sheets("DATA2").[C12] = TextBox86.Value
Sheets("DATA2").[D12] = TextBox87.Value
Sheets("DATA2").[E12] = TextBox88.Value
Sheets("DATA2").[F12] = TextBox89.Value
Sheets("DATA2").[G12] = TextBox90.Value
Sheets("DATA2").[H12] = TextBox91.Value
Sheets("DATA2").[I12] = TextBox92.Value
Sheets("DATA2").[J12] = TextBox93.Value
Sheets("DATA2").[K12] = TextBox94.Value
Sheets("DATA2").[L12] = TextBox95.Value
Sheets("DATA2").[M12] = TextBox96.Value
Sheets("DATA2").[B13] = TextBox97.Value
Sheets("DATA2").[C13] = TextBox98.Value
Sheets("DATA2").[D13] = TextBox99.Value
Sheets("DATA2").[E13] = TextBox100.Value
Sheets("DATA2").[F13] = TextBox101.Value
Sheets("DATA2").[G13] = TextBox102.Value
Sheets("DATA2").[H13] = TextBox103.Value
Sheets("DATA2").[I13] = TextBox104.Value
Sheets("DATA2").[J13] = TextBox105.Value
Sheets("DATA2").[K13] = TextBox106.Value
Sheets("DATA2").[L13] = TextBox107.Value
Sheets("DATA2").[M13] = TextBox108.Value
Sheets("DATA2").[B15] = TextBox109.Value
Sheets("DATA2").[C15] = TextBox110.Value
Sheets("DATA2").[D15] = TextBox111.Value
Sheets("DATA2").[E15] = TextBox112.Value
Sheets("DATA2").[F15] = TextBox113.Value
Sheets("DATA2").[G15] = TextBox114.Value
Sheets("DATA2").[H15] = TextBox115.Value
Sheets("DATA2").[I15] = TextBox116.Value
Sheets("DATA2").[J15] = TextBox117.Value
Sheets("DATA2").[K15] = TextBox118.Value
Sheets("DATA2").[L15] = TextBox119.Value
Sheets("DATA2").[M15] = TextBox120.Value
Sheets("DATA2").[B16] = TextBox121.Value
Sheets("DATA2").[C16] = TextBox122.Value
Sheets("DATA2").[D16] = TextBox123.Value
Sheets("DATA2").[E16] = TextBox124.Value
Sheets("DATA2").[F16] = TextBox125.Value
Sheets("DATA2").[G16] = TextBox126.Value
Sheets("DATA2").[H16] = TextBox127.Value
Sheets("DATA2").[I16] = TextBox128.Value
Sheets("DATA2").[J16] = TextBox129.Value
Sheets("DATA2").[K16] = TextBox130.Value
Sheets("DATA2").[L16] = TextBox131.Value
Sheets("DATA2").[M16] = TextBox132.Value
Sheets("DATA2").[B17] = TextBox133.Value
Sheets("DATA2").[C17] = TextBox134.Value
Sheets("DATA2").[D17] = TextBox135.Value
Sheets("DATA2").[E17] = TextBox136.Value
Sheets("DATA2").[F17] = TextBox137.Value
Sheets("DATA2").[G17] = TextBox138.Value
Sheets("DATA2").[H17] = TextBox139.Value
Sheets("DATA2").[I17] = TextBox140.Value
Sheets("DATA2").[J17] = TextBox141.Value
Sheets("DATA2").[K17] = TextBox142.Value
Sheets("DATA2").[L17] = TextBox143.Value
Sheets("DATA2").[M17] = TextBox144.Value
Sheets("DATA2").[B20] = TextBox145.Value
Sheets("DATA2").[C20] = TextBox146.Value
Sheets("DATA2").[D20] = TextBox147.Value
Sheets("DATA2").[E20] = TextBox148.Value
Sheets("DATA2").[F20] = TextBox149.Value
Sheets("DATA2").[G20] = TextBox150.Value
Sheets("DATA2").[H20] = TextBox151.Value
Sheets("DATA2").[I20] = TextBox152.Value
Sheets("DATA2").[J20] = TextBox153.Value
Sheets("DATA2").[K20] = TextBox154.Value
Sheets("DATA2").[L20] = TextBox155.Value
Sheets("DATA2").[M20] = TextBox156.Value
Sheets("DATA2").[B21] = TextBox157.Value
Sheets("DATA2").[C21] = TextBox158.Value
Sheets("DATA2").[D21] = TextBox159.Value
Sheets("DATA2").[E21] = TextBox160.Value
Sheets("DATA2").[F21] = TextBox161.Value
Sheets("DATA2").[G21] = TextBox162.Value
Sheets("DATA2").[H21] = TextBox163.Value
Sheets("DATA2").[I21] = TextBox164.Value
Sheets("DATA2").[J21] = TextBox165.Value
Sheets("DATA2").[K21] = TextBox166.Value
Sheets("DATA2").[L21] = TextBox167.Value
Sheets("DATA2").[M21] = TextBox168.Value
Sheets("DATA2").[B22] = TextBox169.Value
Sheets("DATA2").[C22] = TextBox170.Value
Sheets("DATA2").[D22] = TextBox171.Value
Sheets("DATA2").[E22] = TextBox172.Value
Sheets("DATA2").[F22] = TextBox173.Value
Sheets("DATA2").[G22] = TextBox174.Value
Sheets("DATA2").[H22] = TextBox175.Value
Sheets("DATA2").[I22] = TextBox176.Value
Sheets("DATA2").[J22] = TextBox177.Value
Sheets("DATA2").[K22] = TextBox178.Value
Sheets("DATA2").[L22] = TextBox179.Value
Sheets("DATA2").[M22] = TextBox180.Value
Sheets("DATA2").[B24] = TextBox181.Value
Sheets("DATA2").[C24] = TextBox182.Value
Sheets("DATA2").[D24] = TextBox183.Value
Sheets("DATA2").[E24] = TextBox184.Value
Sheets("DATA2").[F24] = TextBox185.Value
Sheets("DATA2").[G24] = TextBox186.Value
Sheets("DATA2").[H24] = TextBox187.Value
Sheets("DATA2").[I24] = TextBox188.Value
Sheets("DATA2").[J24] = TextBox189.Value
Sheets("DATA2").[K24] = TextBox190.Value
Sheets("DATA2").[L24] = TextBox191.Value
Sheets("DATA2").[M24] = TextBox192.Value
Sheets("DATA2").[B25] = TextBox193.Value
Sheets("DATA2").[C25] = TextBox194.Value
Sheets("DATA2").[D25] = TextBox195.Value
Sheets("DATA2").[E25] = TextBox196.Value
Sheets("DATA2").[F25] = TextBox197.Value
Sheets("DATA2").[G25] = TextBox198.Value
Sheets("DATA2").[H25] = TextBox199.Value
Sheets("DATA2").[I25] = TextBox200.Value
Sheets("DATA2").[J25] = TextBox201.Value
Sheets("DATA2").[K25] = TextBox202.Value
Sheets("DATA2").[L25] = TextBox203.Value
Sheets("DATA2").[M25] = TextBox204.Value
Sheets("DATA2").[B26] = TextBox205.Value
Sheets("DATA2").[C26] = TextBox206.Value
Sheets("DATA2").[D26] = TextBox207.Value
Sheets("DATA2").[E26] = TextBox208.Value
Sheets("DATA2").[F26] = TextBox209.Value
Sheets("DATA2").[G26] = TextBox210.Value
Sheets("DATA2").[H26] = TextBox211.Value
Sheets("DATA2").[I26] = TextBox212.Value
Sheets("DATA2").[J26] = TextBox213.Value
Sheets("DATA2").[K26] = TextBox214.Value
Sheets("DATA2").[L26] = TextBox215.Value
Sheets("DATA2").[M26] = TextBox216.Value
Sheets("DATA2").[B29] = TextBox217.Value
Sheets("DATA2").[B30] = TextBox218.Value
Sheets("DATA2").[B31] = TextBox219.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox15.Value = ""
TextBox16.Value = ""
TextBox17.Value = ""
TextBox18.Value = ""
TextBox19.Value = ""
TextBox20.Value = ""
TextBox21.Value = ""
TextBox22.Value = ""
TextBox23.Value = ""
TextBox24.Value = ""
TextBox25.Value = ""
TextBox26.Value = ""
TextBox27.Value = ""
TextBox28.Value = ""
TextBox29.Value = ""
TextBox30.Value = ""
TextBox31.Value = ""
TextBox32.Value = ""
TextBox33.Value = ""
TextBox34.Value = ""
TextBox35.Value = ""
TextBox36.Value = ""
TextBox37.Value = ""
TextBox38.Value = ""
TextBox39.Value = ""
TextBox40.Value = ""
TextBox41.Value = ""
TextBox42.Value = ""
TextBox43.Value = ""
TextBox44.Value = ""
TextBox45.Value = ""
TextBox46.Value = ""
TextBox47.Value = ""
TextBox48.Value = ""
TextBox49.Value = ""
TextBox50.Value = ""
TextBox51.Value = ""
TextBox52.Value = ""
TextBox53.Value = ""
TextBox54.Value = ""
TextBox55.Value = ""
TextBox56.Value = ""
TextBox57.Value = ""
TextBox58.Value = ""
TextBox59.Value = ""
TextBox60.Value = ""
TextBox61.Value = ""
TextBox62.Value = ""
TextBox63.Value = ""
TextBox64.Value = ""
TextBox65.Value = ""
TextBox66.Value = ""
TextBox67.Value = ""
TextBox68.Value = ""
TextBox69.Value = ""
TextBox70.Value = ""
TextBox71.Value = ""
TextBox72.Value = ""
TextBox73.Value = ""
TextBox74.Value = ""
TextBox75.Value = ""
TextBox76.Value = ""
TextBox77.Value = ""
TextBox78.Value = ""
TextBox79.Value = ""
TextBox80.Value = ""
TextBox81.Value = ""
TextBox82.Value = ""
TextBox83.Value = ""
TextBox84.Value = ""
TextBox85.Value = ""
TextBox86.Value = ""
TextBox87.Value = ""
TextBox88.Value = ""
TextBox89.Value = ""
TextBox90.Value = ""
TextBox91.Value = ""
TextBox92.Value = ""
TextBox93.Value = ""
TextBox94.Value = ""
TextBox95.Value = ""
TextBox96.Value = ""
TextBox97.Value = ""
TextBox98.Value = ""
TextBox99.Value = ""
TextBox100.Value = ""
TextBox101.Value = ""
TextBox102.Value = ""
TextBox103.Value = ""
TextBox104.Value = ""
TextBox105.Value = ""
TextBox106.Value = ""
TextBox107.Value = ""
TextBox108.Value = ""
TextBox109.Value = ""
TextBox110.Value = ""
TextBox111.Value = ""
TextBox112.Value = ""
TextBox113.Value = ""
TextBox114.Value = ""
TextBox115.Value = ""
TextBox116.Value = ""
TextBox117.Value = ""
TextBox118.Value = ""
TextBox119.Value = ""
TextBox120.Value = ""
TextBox121.Value = ""
TextBox122.Value = ""
TextBox123.Value = ""
TextBox124.Value = ""
TextBox125.Value = ""
TextBox126.Value = ""
TextBox127.Value = ""
TextBox128.Value = ""
TextBox129.Value = ""
TextBox130.Value = ""
TextBox131.Value = ""
TextBox132.Value = ""
TextBox133.Value = ""
TextBox134.Value = ""
TextBox135.Value = ""
TextBox136.Value = ""
TextBox137.Value = ""
TextBox138.Value = ""
TextBox139.Value = ""
TextBox140.Value = ""
TextBox141.Value = ""
TextBox142.Value = ""
TextBox143.Value = ""
TextBox144.Value = ""
TextBox145.Value = ""
TextBox146.Value = ""
TextBox147.Value = ""
TextBox148.Value = ""
TextBox149.Value = ""
TextBox150.Value = ""
TextBox151.Value = ""
TextBox152.Value = ""
TextBox153.Value = ""
TextBox154.Value = ""
TextBox155.Value = ""
TextBox156.Value = ""
TextBox157.Value = ""
TextBox158.Value = ""
TextBox159.Value = ""
TextBox160.Value = ""
TextBox161.Value = ""
TextBox162.Value = ""
TextBox163.Value = ""
TextBox164.Value = ""
TextBox165.Value = ""
TextBox166.Value = ""
TextBox167.Value = ""
TextBox168.Value = ""
TextBox169.Value = ""
TextBox170.Value = ""
TextBox171.Value = ""
TextBox172.Value = ""
TextBox173.Value = ""
TextBox174.Value = ""
TextBox175.Value = ""
TextBox176.Value = ""
TextBox177.Value = ""
TextBox178.Value = ""
TextBox179.Value = ""
TextBox180.Value = ""
TextBox181.Value = ""
TextBox182.Value = ""
TextBox183.Value = ""
TextBox184.Value = ""
TextBox185.Value = ""
TextBox186.Value = ""
TextBox187.Value = ""
TextBox188.Value = ""
TextBox189.Value = ""
TextBox190.Value = ""
TextBox191.Value = ""
TextBox192.Value = ""
TextBox193.Value = ""
TextBox194.Value = ""
TextBox195.Value = ""
TextBox196.Value = ""
TextBox197.Value = ""
TextBox198.Value = ""
TextBox199.Value = ""
TextBox200.Value = ""
TextBox201.Value = ""
TextBox202.Value = ""
TextBox203.Value = ""
TextBox204.Value = ""
TextBox205.Value = ""
TextBox206.Value = ""
TextBox207.Value = ""
TextBox208.Value = ""
TextBox209.Value = ""
TextBox210.Value = ""
TextBox211.Value = ""
TextBox212.Value = ""
TextBox213.Value = ""
TextBox214.Value = ""
TextBox215.Value = ""
TextBox216.Value = ""
TextBox217.Value = ""
TextBox218.Value = ""
TextBox219.Value = ""
End Sub
 
Sayın Bedersu

Desteğiniz için çok teşekkür ederim.
 
Geri
Üst