user formda başka dosyalara veri kaydının yapılması

Katılım
21 Mart 2008
Mesajlar
7
Excel Vers. ve Dili
2007
Arkadaşlar merhaba user form kullanarak kalite kontrol raporları yapmak istiyorum ancak yaptığım form şuan veri fazlalığından 30 mb oldu 4 çeşit kalite raporum var bunları ayrı dosyalara user form üzerindeki kayıt butonu ile nasıl kayıt ederim saygıalrımla


Private Sub CommandButton1_Click()
On Error Resume Next
Sheets("veri").Select { kalite dosyasındaki veri sayfasına kayıt ediyor bu kayıtı kalite raproları klasöründeki final kontrol dosyasına nasıl kayıt edebiliriz. Tek userform kullanıyorum sadece kayıt depolamak için ayrı excel dosyası kullanmak istiyorum } Dim bak As Range '****
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = ComboBox1.Value Then
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
If ComboBox1.Text = "" Then
MsgBox "Lütfen Önce Rapor No Girin...", , "Kayıt Hatası!!!"
Exit Sub
End If
Next bak
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
MsgBox "Bu isimde bir kaydınız bulundu"
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65500"))
TextBox1.Value = say
Cells(say + 1, 1).Value = TextBox1.Value
Cells(say + 1, 2).Value = ComboBox1.Value
Cells(say + 1, 3).Value = TextBox180.Value
Cells(say + 1, 4).Value = TextBox181.Value
Cells(say + 1, 5).Value = TextBox182.Value
Cells(say + 1, 6).Value = TextBox183.Value
Cells(say + 1, 7).Value = ComboBox7.Value
Cells(say + 1, 8).Value = TextBox97.Value
Cells(say + 1, 9).Value = TextBox3.Value
Cells(say + 1, 10).Value = TextBox12.Value
Cells(say + 1, 11).Value = ComboBox40.Value
Cells(say + 1, 12).Value = ComboBox41.Value
Cells(say + 1, 13).Value = ComboBox51.Value
Cells(say + 1, 14).Value = ComboBox52.Value
Cells(say + 1, 15).Value = ComboBox53.Value
Cells(say + 1, 16).Value = ComboBox50.Value
Cells(say + 1, 17).Value = TextBox184.Value
Cells(say + 1, 18).Value = TextBox15.Value
Cells(say + 1, 19).Value = TextBox192.Value
Cells(say + 1, 20).Value = TextBox107.Value
Cells(say + 1, 21).Value = TextBox200.Value
Cells(say + 1, 22).Value = TextBox208.Value
Cells(say + 1, 23).Value = TextBox105.Value
Cells(say + 1, 31).Value = TextBox118.Value
Cells(say + 1, 32).Value = TextBox119.Value
Cells(say + 1, 33).Value = TextBox120.Value
Cells(say + 1, 34).Value = TextBox121.Value
Cells(say + 1, 35).Value = TextBox122.Value
Cells(say + 1, 36).Value = TextBox123.Value
Cells(say + 1, 37).Value = TextBox124.Value
Cells(say + 1, 38).Value = TextBox125.Value
Cells(say + 1, 39).Value = TextBox117.Value
Cells(say + 1, 40).Value = TextBox19.Value
Cells(say + 1, 41).Value = ComboBox42.Value
Cells(say + 1, 42).Value = TextBox185.Value
Cells(say + 1, 43).Value = TextBox30.Value
Cells(say + 1, 44).Value = TextBox193.Value
Cells(say + 1, 45).Value = TextBox106.Value
Cells(say + 1, 46).Value = TextBox201.Value
Cells(say + 1, 47).Value = TextBox209.Value
Cells(say + 1, 48).Value = TextBox108.Value
Cells(say + 1, 49).Value = TextBox109.Value
Cells(say + 1, 50).Value = TextBox110.Value
Cells(say + 1, 51).Value = TextBox111.Value
Cells(say + 1, 52).Value = TextBox112.Value
Cells(say + 1, 53).Value = TextBox113.Value
Cells(say + 1, 54).Value = TextBox114.Value
Cells(say + 1, 55).Value = TextBox115.Value
Cells(say + 1, 56).Value = TextBox116.Value
Cells(say + 1, 57).Value = TextBox20.Value
Cells(say + 1, 58).Value = ComboBox43.Value
Cells(say + 1, 59).Value = TextBox186.Value
Cells(say + 1, 60).Value = TextBox41.Value
Cells(say + 1, 61).Value = TextBox194.Value
Cells(say + 1, 62).Value = TextBox98.Value
Cells(say + 1, 63).Value = TextBox202.Value
Cells(say + 1, 64).Value = TextBox210.Value
Cells(say + 1, 65).Value = TextBox127.Value
Cells(say + 1, 66).Value = TextBox128.Value
Cells(say + 1, 67).Value = TextBox129.Value
Cells(say + 1, 68).Value = TextBox130.Value
Cells(say + 1, 69).Value = TextBox131.Value
Cells(say + 1, 70).Value = TextBox132.Value
Cells(say + 1, 71).Value = TextBox133.Value
Cells(say + 1, 72).Value = TextBox134.Value
Cells(say + 1, 73).Value = TextBox126.Value
Cells(say + 1, 74).Value = TextBox31.Value
Cells(say + 1, 75).Value = ComboBox44.Value
Cells(say + 1, 76).Value = TextBox187.Value
Cells(say + 1, 77).Value = TextBox52.Value
Cells(say + 1, 78).Value = TextBox195.Value
Cells(say + 1, 79).Value = TextBox99.Value
Cells(say + 1, 80).Value = TextBox203.Value
Cells(say + 1, 81).Value = TextBox211.Value
Cells(say + 1, 82).Value = TextBox136.Value
Cells(say + 1, 83).Value = TextBox137.Value
Cells(say + 1, 84).Value = TextBox138.Value
Cells(say + 1, 85).Value = TextBox139.Value
Cells(say + 1, 86).Value = TextBox140.Value
Cells(say + 1, 87).Value = TextBox141.Value
Cells(say + 1, 88).Value = TextBox142.Value
Cells(say + 1, 89).Value = TextBox143.Value
Cells(say + 1, 90).Value = TextBox135.Value
Cells(say + 1, 91).Value = TextBox42.Value
Cells(say + 1, 92).Value = ComboBox45.Value
Cells(say + 1, 93).Value = TextBox188.Value
Cells(say + 1, 94).Value = TextBox63.Value
Cells(say + 1, 95).Value = TextBox196.Value
Cells(say + 1, 96).Value = TextBox100.Value
Cells(say + 1, 97).Value = TextBox204.Value
Cells(say + 1, 98).Value = TextBox212.Value
Cells(say + 1, 99).Value = TextBox145.Value
Cells(say + 1, 100).Value = TextBox146.Value
Cells(say + 1, 101).Value = TextBox147.Value
Cells(say + 1, 102).Value = TextBox148.Value
Cells(say + 1, 103).Value = TextBox149.Value
Cells(say + 1, 104).Value = TextBox150.Value
Cells(say + 1, 105).Value = TextBox151.Value
Cells(say + 1, 106).Value = TextBox152.Value
Cells(say + 1, 107).Value = TextBox144.Value
Cells(say + 1, 108).Value = TextBox53.Value
Cells(say + 1, 109).Value = ComboBox46.Value
Cells(say + 1, 110).Value = TextBox189.Value
Cells(say + 1, 111).Value = TextBox74.Value
Cells(say + 1, 112).Value = TextBox197.Value
Cells(say + 1, 113).Value = TextBox101.Value
Cells(say + 1, 114).Value = TextBox205.Value
Cells(say + 1, 115).Value = TextBox213.Value
Cells(say + 1, 116).Value = TextBox154.Value
Cells(say + 1, 117).Value = TextBox155.Value
Cells(say + 1, 118).Value = TextBox156.Value
Cells(say + 1, 119).Value = TextBox157.Value
Cells(say + 1, 120).Value = TextBox158.Value
Cells(say + 1, 121).Value = TextBox159.Value
Cells(say + 1, 122).Value = TextBox160.Value
Cells(say + 1, 123).Value = TextBox161.Value
Cells(say + 1, 124).Value = TextBox153.Value
Cells(say + 1, 125).Value = TextBox64.Value
Cells(say + 1, 126).Value = ComboBox47.Value
Cells(say + 1, 127).Value = TextBox190.Value
Cells(say + 1, 128).Value = TextBox85.Value
Cells(say + 1, 129).Value = TextBox198.Value
Cells(say + 1, 130).Value = TextBox102.Value
Cells(say + 1, 131).Value = TextBox206.Value
Cells(say + 1, 132).Value = TextBox214.Value
Cells(say + 1, 133).Value = TextBox163.Value
Cells(say + 1, 134).Value = TextBox164.Value
Cells(say + 1, 135).Value = TextBox165.Value
Cells(say + 1, 136).Value = TextBox166.Value
Cells(say + 1, 137).Value = TextBox167.Value
Cells(say + 1, 138).Value = TextBox168.Value
Cells(say + 1, 139).Value = TextBox169.Value
Cells(say + 1, 140).Value = TextBox170.Value
Cells(say + 1, 141).Value = TextBox162.Value
Cells(say + 1, 142).Value = TextBox75.Value
Cells(say + 1, 143).Value = ComboBox48.Value
Cells(say + 1, 144).Value = TextBox191.Value
Cells(say + 1, 145).Value = TextBox96.Value
Cells(say + 1, 146).Value = TextBox199.Value
Cells(say + 1, 147).Value = TextBox103.Value
Cells(say + 1, 148).Value = TextBox207.Value
Cells(say + 1, 149).Value = TextBox215.Value
Cells(say + 1, 150).Value = TextBox172.Value
Cells(say + 1, 151).Value = TextBox173.Value
Cells(say + 1, 152).Value = TextBox174.Value
Cells(say + 1, 153).Value = TextBox175.Value
Cells(say + 1, 154).Value = TextBox176.Value
Cells(say + 1, 155).Value = TextBox177.Value
Cells(say + 1, 156).Value = TextBox178.Value
Cells(say + 1, 157).Value = TextBox179.Value
Cells(say + 1, 158).Value = TextBox171.Value
Cells(say + 1, 159).Value = TextBox86.Value
Cells(say + 1, 160).Value = ComboBox49.Value





MsgBox "Yeni Kayıt Başarıyla Yapılmıştır.", vbInformation, "Sn. " & Application.UserName

Range("A2:A65500").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'************************
Range("B2:U65500").Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B2").Select '*********
TextBox1.Value = WorksheetFunction.Count(Range("A1:A65500")) + 1
CommandButton5_Click
TextBox17 = Sheets("veri").Range("AB1").Value
TextBox18 = Sheets("veri").Range("AC1").Value
ComboBox2_Change
ComboBox1.SetFocus
Unload UserForm1
UserForm1.Show
End Sub
 
Üst