Multipage sayfalarında kod çalıştırma

NBATMAN

Destek Ekibi
Destek Ekibi
Katılım
1 Aralık 2007
Mesajlar
639
Excel Vers. ve Dili
Office 2003 excel Türkçe
Merhaba arkadaşlar herkese iyi bayramlar...
Aşağıdaki kodlarda kırmızı ile işaretli satır için ekteki hata mesajını alıyorum yardımcı olabilir misiniz?


Private Sub MultiPage1_change()
If MultiPage1.Value = 0 Then
On Error GoTo m
End If
If MultiPage1.Value = 1 Then
On Error GoTo n
End If
End Sub
m:
Private Sub CommandButton1_Click() 'BUL
Dim k As Range, i As Byte
If ComboBox1.Value = " " Then Exit Sub 'kayıt no seçimi için combobox1
Set k = Sayfa1.Range("A6:A525").Find(ComboBox1.Value, , xlValues, xlWhole)
For i = 1 To 8
Controls("TextBox" & i).Value = Empty
Next
If Not k Is Nothing Then
Sayfa1.Activate
k.Select
TextBox2.Value = k.Offset(0, 1).Value
TextBox3.Value = k.Offset(0, 2).Value
TextBox4.Value = k.Offset(0, 3).Value
TextBox5.Value = k.Offset(0, 4).Value
TextBox6.Value = k.Offset(0, 5).Value
TextBox7.Value = k.Offset(0, 6).Value
TextBox8.Value = k.Offset(0, 7).Value
TextBox9.Value = k.Offset(0, 8).Value
TextBox10.Value = k.Offset(0, 9).Value
TextBox11.Value = k.Offset(0, 10).Value
TextBox12.Value = k.Offset(0, 11).Value
TextBox13.Value = k.Offset(0, 12).Value
Else
MsgBox "Değer Bulunumadı", vbCritical, "DİKKAT"
End If
ComboBox2.Text = TextBox4.Text
ComboBox3.Text = TextBox8.Text
ComboBox4.Text = TextBox9.Text
ComboBox5.Text = TextBox10.Text
ComboBox6.Text = TextBox11.Text
ComboBox7.Text = TextBox12.Text
ComboBox8.Text = TextBox13.Text
ComboBox9.Text = TextBox6.Text
End Sub
Private Sub CommandButton2_Click() 'DEĞİŞTİR
If ComboBox1.Value = "" Then Exit Sub
If MsgBox("Aktif satırdaki [ " & Sayfa1.Cells(ActiveCell.Row, "A").Value & _
" ] NO lu kaydı değiştirmek istiyormusunuz?", vbYesNo + vbInformation, "DEĞİŞTİR") = vbNo Then Exit Sub
Sayfa1.Cells(ActiveCell.Row, "A").Value = ComboBox1.Value
Sayfa1.Cells(ActiveCell.Row, "B").Value = TextBox2.Value
Sayfa1.Cells(ActiveCell.Row, "C").Value = TextBox3.Value
Sayfa1.Cells(ActiveCell.Row, "D").Value = TextBox4.Value
Sayfa1.Cells(ActiveCell.Row, "E").Value = TextBox5.Value
Sayfa1.Cells(ActiveCell.Row, "F").Value = TextBox6.Value
Sayfa1.Cells(ActiveCell.Row, "G").Value = TextBox7.Value
Sayfa1.Cells(ActiveCell.Row, "H").Value = TextBox8.Value
Sayfa1.Cells(ActiveCell.Row, "I").Value = TextBox9.Value
Sayfa1.Cells(ActiveCell.Row, "J").Value = TextBox10.Value
Sayfa1.Cells(ActiveCell.Row, "K").Value = TextBox11.Value
Sayfa1.Cells(ActiveCell.Row, "L").Value = TextBox12.Value
Sayfa1.Cells(ActiveCell.Row, "M").Value = TextBox13.Text
MsgBox "Değişiklik yapıldı..", vbOKOnly + vbInformation, "DEĞİŞİKLİK"
Dim obj As Object
For Each obj In Me.Controls
If TypeName(obj) = "TextBox" Or TypeName(obj) = "ComboBox" Then
obj.Value = Empty
End If
Next
End Sub
Private Sub CommandButton3_Click() 'USERFORM KAPAT
Unload KART
End Sub
Private Sub Combobox2_Click() 'kart adı seçimi combobox2
TextBox4.Text = ComboBox2.Text
Exit Sub
End Sub
Private Sub Combobox3_ClicK() 'arıza kodu seçimi combobox3
TextBox8.Text = ComboBox3.Text
TextBox14 = Sayfa3.Range("L115")
Exit Sub
End Sub
Private Sub Combobox4_ClicK() 'kontroldurumu seçimi combobox4
TextBox9.Text = ComboBox4.Text
TextBox15 = Sayfa3.Range("P100")
Exit Sub
End Sub
Private Sub Combobox5_ClicK() 'üreten seçimi combobox5
TextBox10.Text = ComboBox5.Text
TextBox16 = Sayfa3.Range("N104")
Exit Sub
End Sub
Private Sub Combobox6_ClicK() 'test eden seçimi combobox6
TextBox11.Text = ComboBox6.Text
TextBox17 = Sayfa3.Range("F102")
Exit Sub
End Sub
Private Sub Combobox7_ClicK() 'tespit eden seçimi combobox7
TextBox12.Text = ComboBox7.Text
TextBox18 = Sayfa3.Range("J102")
Exit Sub
End Sub
Private Sub Combobox8_ClicK() 'tamir eden seçimi combobox8
TextBox13.Text = ComboBox8.Text
TextBox19 = Sayfa3.Range("H102")
Exit Sub
End Sub
Private Sub ComboBox9_Change() 'arıza seçimi combobox9
TextBox6.Text = ComboBox9.Text
Exit Sub
End Sub
Private Sub ComboBox2_Change() ' seçilen kart adına göre data sayfasından arıza tiplerinin çağrılması
'TextBox4.Text = ComboBox2.Text
'Exit Sub
Range("DATA!B78").Value = ComboBox2.Text
End Sub
Private Sub ComboBox3_Change() 'arıza kodu seçimi combobox3
TextBox8.Text = ComboBox3.Text
Range("DATA!L114").Value = ComboBox3.Text
' TextBox14 = Sayfa3.Range("L115")
'Exit Sub
End Sub
Private Sub ComboBox4_Change() 'kontroldurumu seçimi combobox4
TextBox9.Text = ComboBox4.Text
'Exit Sub
Range("DATA!P99").Value = ComboBox4.Text
'TextBox15 = Sayfa3.Range("P100")
End Sub
Private Sub ComboBox5_Change() 'üreten seçimi combobox5
TextBox10.Text = ComboBox5.Text
Range("DATA!N103").Value = ComboBox5.Text
'TextBox16 = Sayfa3.Range("N104")
'Exit Sub
End Sub
Private Sub ComboBox6_Change() 'test eden seçimi combobox6
Range("DATA!F101").Value = ComboBox6.Text
TextBox11.Text = ComboBox6.Text
'Exit Sub
'TextBox17 = Sayfa3.Range("F102")
End Sub
Private Sub ComboBox7_Change() 'tespit eden seçimi combobox7
TextBox12.Text = ComboBox7.Text
Range("DATA!J101").Value = ComboBox7.Text
'TextBox18 = Sayfa3.Range("J102")
'Exit Sub
End Sub
Private Sub ComboBox8_Change() 'tamir eden seçimi combobox8
TextBox13.Text = ComboBox8.Text
'Exit Sub
Range("DATA!H101").Value = ComboBox8.Text
'TextBox19 = Sayfa3.Range("H102")
End Sub
Private Sub Userform1_Initialize()
DTPicker1.Value = Left(Now, 10) ' Date
DTPicker2.Value = Left(Now, 10) ' Date
ComboBox2.RowSource = "sayfa3!d4:d77"
ComboBox3.RowSource = "sayfa3!L94:L112"
ComboBox4.RowSource = "sayfa3!P94:p97"
ComboBox5.RowSource = "sayfa3!N94:N101"
ComboBox6.RowSource = "sayfa3!J94:J99"
ComboBox7.RowSource = "sayfa3!F94:F99"
ComboBox8.RowSource = "sayfa3!H94:H99"
CommandButton1.Enabled = False
CommandButton2.Enabled = False
CommandButton4.Enabled = False
DTPicker1.Enabled = False
DTPicker2.Enabled = False
TextBox7.Enabled = False
TextBox5.Enabled = False
TextBox6.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
ComboBox2.Enabled = False
ComboBox3.Enabled = False
ComboBox4.Enabled = False
ComboBox5.Enabled = False
ComboBox6.Enabled = False
ComboBox7.Enabled = False
ComboBox8.Enabled = False
ComboBox9.Enabled = False
TextBox14.Enabled = False
TextBox15.Enabled = False
TextBox16.Enabled = False
TextBox17.Enabled = False
TextBox18.Enabled = False
TextBox19.Enabled = False
DTPicker3.Value = Left(Now, 10) 'Date
DTPicker4.Value = Left(Now, 10) 'Date
'CreateObject("Shell.Application").MinimizeAll
'CreateObject("Shell.Application").MinimizeAll
ComboBox21.RowSource = "sayfa3!C94:C513"
ComboBox31.RowSource = "sayfa3!V94:V122"
ComboBox41.RowSource = "sayfa3!R94:R96"
ComboBox51.RowSource = "sayfa3!X94:X101"
ComboBox61.RowSource = "sayfa3!F94:H99"
ComboBox71.RowSource = "sayfa3!J94:G99"
ComboBox81.RowSource = "sayfa3!H94:F99"
ComboBox91.RowSource = "sayfa3!D94:D133"
ComboBox101.RowSource = "sayfa3!T94:T96"
CommandButton101.Enabled = False
CommandButton21.Enabled = False
CommandButton41.Enabled = False
CommandButton51.Enabled = False
DTPicker3.Enabled = False
DTPicker4.Enabled = False
TextBox103.Enabled = False
TextBox105.Enabled = False
TextBox106.Enabled = False
TextBox112.Enabled = False
TextBox113.Enabled = False
TextBox114.Enabled = False
ComboBox21.Enabled = False
ComboBox31.Enabled = False
ComboBox41.Enabled = False
ComboBox51.Enabled = False
ComboBox61.Enabled = False
ComboBox71.Enabled = False
ComboBox81.Enabled = False
ComboBox91.Enabled = False
ComboBox101.Enabled = False
TextBox115.Enabled = False
TextBox116.Enabled = False
TextBox117.Enabled = False
TextBox118.Enabled = False
TextBox119.Enabled = False
TextBox120.Enabled = False
TextBox121.Enabled = False
Image2.Visible = False
CommandButton61.Visible = False
End Sub
Private Sub CommandButton5_Click() 'tümseçimleri temizleme butonu
Dim ctrl As Control
For Each ctrl In KART.Controls
If TypeName(ctrl) = "TextBox" Or TypeName(ctrl) = "ComboBox" Then
ctrl.Value = Empty
End If
Next ctrl
End Sub
Private Sub DTPicker1_exit(ByVal Cancel As MSForms.ReturnBoolean) 'kart giriş tarihi DTPicker1
TextBox2.Value = DTPicker1.Value
End Sub
Private Sub DTPicker2_exit(ByVal Cancel As MSForms.ReturnBoolean) 'kart çıkış tarihi DTPicker2
TextBox3.Value = DTPicker2.Value 'Format(CDate(DTPicker2.Value), "dd/mm/yyyy")
End Sub
Private Sub OptionButton1_Click() 'kart yeni kayıt OptionButton1
If OptionButton1 = True Then
CommandButton1.Enabled = False
CommandButton2.Enabled = False
CommandButton4.Enabled = True
ComboBox1.Enabled = False
Label5.Enabled = False
DTPicker1.Enabled = True
DTPicker2.Enabled = True
TextBox7.Enabled = True
TextBox5.Enabled = True
TextBox6.Enabled = True
TextBox2.Enabled = True
TextBox3.Enabled = True
ComboBox2.Enabled = True
ComboBox3.Enabled = True
ComboBox4.Enabled = True
ComboBox5.Enabled = True
ComboBox6.Enabled = True
ComboBox7.Enabled = True
ComboBox8.Enabled = True
ComboBox9.Enabled = True
End If
End Sub
Private Sub OptionButton2_Click() 'kart bul değiştir OptionButton2
If OptionButton2 = True Then
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton4.Enabled = False
ComboBox1.Enabled = True
Label5.Enabled = True
DTPicker1.Enabled = True
DTPicker2.Enabled = True
TextBox7.Enabled = True
TextBox5.Enabled = True
TextBox6.Enabled = True
TextBox2.Enabled = True
TextBox3.Enabled = True
ComboBox2.Enabled = True
ComboBox3.Enabled = True
ComboBox4.Enabled = True
ComboBox5.Enabled = True
ComboBox6.Enabled = True
ComboBox7.Enabled = True
ComboBox8.Enabled = True
ComboBox9.Enabled = True
End If
End Sub
Private Sub CommandButton4_Click() 'KAYDET
Dim SAT As String
Dim i As Integer
TextBox1.Text = Sheets("KART").Range("Q4") 'kayıt no seçimi için combobox1 ile bağlantılı textbox1
If TextBox4.Value = "" Then
MsgBox "Kart adı boş olamaz..!!" & vbLf & "Bir kart adı giriniz..!!", vbCritical, "DİKKAT"
TextBox4.SetFocus
Exit Sub
End If
If TextBox5.Value = "" Then
MsgBox "Kart seri no boş olamaz..!!" & vbLf & "Bir kart seri nosu giriniz..!!", vbCritical, "DİKKAT"
TextBox5.SetFocus
Exit Sub
End If
If TextBox8.Value = "" Then
MsgBox "Arıza kodu boş olamaz..!!" & vbLf & "Bir arıza kodu giriniz..!!", vbCritical, "DİKKAT"
TextBox8.SetFocus
Exit Sub
End If
If TextBox9.Value = "" Then
MsgBox "Kontrol durumu boş olamaz..!!" & vbLf & "Bir kontrol durumu giriniz..!!", vbCritical, "DİKKAT"
TextBox9.SetFocus
Exit Sub
End If
If TextBox10.Value = "" Then
MsgBox "Üreten boş olamaz..!!" & vbLf & "Bir üreten giriniz..!!", vbCritical, "DİKKAT"
TextBox10.SetFocus
Exit Sub
End If
If TextBox11.Value = "" Then
MsgBox "Test eden boş olamaz..!!" & vbLf & "Bir test eden giriniz..!!", vbCritical, "DİKKAT"
TextBox11.SetFocus
Exit Sub
End If
If TextBox13.Value = "" Then
MsgBox "Tamir eden boş olamaz..!!" & vbLf & "Bir tamir eden giriniz..!!", vbCritical, "DİKKAT"
TextBox13.SetFocus
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox "Giriş tarihi boş olamaz..!!" & vbLf & "Bir giriş tarihi giriniz..!!", vbCritical, "DİKKAT"
TextBox2.SetFocus
Exit Sub
End If
SAT = Sheets("KART").Cells(65536, "A").End(xlUp).Row + 1
For i = 1 To 13
Sheets("KART").Cells(SAT, i).Value = Controls("TextBox" & i).Value
Controls("TextBox" & i).Value = ""
Next i
Sheets("KART").Cells(SAT, "N").Value = TextBox13.Value
TextBox13.Value = ""
TextBox1.SetFocus
MsgBox "Kayıt girildi..!!", vbOKOnly + vbInformation, Application.UserName
Dim obj As Object
For Each obj In Me.Controls
If TypeName(obj) = "TextBox" Or TypeName(obj) = "ComboBox" Then
obj.Value = Empty
End If
Next
End Sub
Private Sub DTPicker1_Change() 'Giriş tarihi
TextBox2.Text = DTPicker1.Value
End Sub
Private Sub DTPicker2_Change() 'çıkış tarihi
TextBox3.Text = DTPicker2.Value
End Sub


'cihaz**---*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
n:
Private Sub ComboBox11_CLICK() ' kayıtno seçimi ile sil butonunun aktif edilmesi
CommandButton61.Enabled = True
End Sub
Private Sub CommandButton101_Click() 'BUL
Dim k As Range, i As Byte
If ComboBox11.Value = "" Then Exit Sub
Set k = Sayfa4.Range("A6:A525").Find(ComboBox11.Value, , xlValues, xlWhole)
For i = 1 To 7
Controls("TextBox" & i).Value = Empty
Next
If Not k Is Nothing Then
Sayfa4.Activate
k.Select
TextBox102.Value = k.Offset(0, 1).Value
TextBox103.Value = k.Offset(0, 2).Value
TextBox104.Value = k.Offset(0, 3).Value ''CİHAZ
TextBox105.Value = k.Offset(0, 4).Value ''CİHAZ SERİ NO
TextBox106.Value = k.Offset(0, 5).Value ''ARIZA
TextBox107.Value = k.Offset(0, 6).Value ''ARIZA KODU
TextBox108.Value = k.Offset(0, 7).Value ''YAPILAN İŞLEM
TextBox109.Value = k.Offset(0, 8).Value
TextBox110.Value = k.Offset(0, 9).Value
TextBox111.Value = k.Offset(0, 10).Value
TextBox112.Value = k.Offset(0, 11).Value
TextBox113.Value = k.Offset(0, 12).Value
TextBox114.Value = k.Offset(0, 13).Value
Else
MsgBox "Değer Bulunumadı", vbCritical, "DİKKAT"
End If
ComboBox21.Text = TextBox104.Text
ComboBox91.Text = TextBox106.Text
ComboBox41.Text = TextBox109.Text
ComboBox51.Text = TextBox110.Text
ComboBox61.Text = TextBox111.Text
ComboBox71.Text = TextBox112.Text
ComboBox81.Text = TextBox113.Text
ComboBox31.Text = TextBox108.Text
ComboBox101.Text = TextBox114.Text
End Sub
Private Sub CommandButton21_Click() 'DEĞİŞTİR
If ComboBox11.Value = "" Then Exit Sub
If MsgBox("Aktif satırdaki [ " & Sayfa4.Cells(ActiveCell.Row, "A").Value & _
" ] NO lu kaydı değiştirmek istiyormusunuz?", vbYesNo + vbInformation, "DEĞİŞTİR") = vbNo Then Exit Sub
Sayfa4.Cells(ActiveCell.Row, "A").Value = ComboBox11.Value
Sayfa4.Cells(ActiveCell.Row, "D").Value = TextBox104.Value ''CİHAZ
Sayfa4.Cells(ActiveCell.Row, "E").Value = TextBox105.Value ''CİHAZ SERİ NO
Sayfa4.Cells(ActiveCell.Row, "F").Value = TextBox106.Value ''ARIZA KODU
Sayfa4.Cells(ActiveCell.Row, "G").Value = TextBox107.Value ''ARIZA
Sayfa4.Cells(ActiveCell.Row, "H").Value = TextBox108.Value ''YAPILAN İŞLEM
Sayfa4.Cells(ActiveCell.Row, "I").Value = TextBox109.Value
Sayfa4.Cells(ActiveCell.Row, "J").Value = TextBox110.Value
Sayfa4.Cells(ActiveCell.Row, "K").Value = TextBox111.Value
Sayfa4.Cells(ActiveCell.Row, "L").Value = TextBox112.Value
Sayfa4.Cells(ActiveCell.Row, "M").Value = TextBox113.Value
Sayfa4.Cells(ActiveCell.Row, "B").Value = TextBox102.Value
Sayfa4.Cells(ActiveCell.Row, "C").Value = TextBox103.Text
Sayfa4.Cells(ActiveCell.Row, "N").Value = TextBox114.Text
MsgBox "Değişiklik yapıldı..", vbOKOnly + vbInformation, "DEĞİŞİKLİK"
Dim obj As Object
For Each obj In Me.Controls
If TypeName(obj) = "TextBox" Or TypeName(obj) = "ComboBox" Then
obj.Value = Empty
End If
Next
End Sub
Private Sub CommandButton31_Click() 'USERFORM KAPAT
Unload CİHAZ
End Sub
Private Sub Combobox21_Click() 'cihaz seçimi
TextBox104.Text = ComboBox21.Text
Exit Sub
End Sub
Private Sub Combobox31_ClicK() 'arıza kodu text boxa aldırma
TextBox108.Text = ComboBox31.Text
TextBox120 = Sayfa3.Range("V125")
Exit Sub
Range("Q9").Text = ComboBox31.Text
End Sub
Private Sub Combobox41_ClicK() 'kontrol durumu text boxa aldırma
TextBox109.Text = ComboBox41.Text
TextBox115 = Sayfa3.Range("R99")
Exit Sub
End Sub
Private Sub Combobox51_ClicK() 'üreten text boxa aldırma
TextBox110.Text = ComboBox51.Text
TextBox116 = Sayfa3.Range("X104")
Exit Sub
End Sub
Private Sub Combobox61_ClicK() 'test eden text boxa aldırma
TextBox111.Text = ComboBox61.Text
TextBox117 = Sayfa3.Range("F102")
Exit Sub
End Sub
Private Sub Combobox71_ClicK() 'tespit eden text boxa aldırma
TextBox112.Text = ComboBox71.Text
TextBox118 = Sayfa3.Range("J102")
Exit Sub
End Sub
Private Sub Combobox81_ClicK() 'tamir eden text boxa aldırma
TextBox113.Text = ComboBox81.Text
TextBox119 = Sayfa3.Range("H102")
Exit Sub
End Sub
Private Sub Combobox91_ClicK() 'Arıza
TextBox106.Text = ComboBox91.Text
Exit Sub
End Sub
Private Sub ComboBox101_Click() 'cihaz tipini text boxa aldırma
TextBox114.Text = ComboBox101.Text
TextBox121 = Sayfa3.Range("T99")
Exit Sub
End Sub
Private Sub ComboBox31_Change() 'arıza kodu
TextBox108.Text = ComboBox31.Text
Range("DATA!V124").Value = ComboBox31.Text
End Sub
Private Sub ComboBox41_Change() 'kontrol durumu
TextBox109.Text = ComboBox41.Text
Range("DATA!R98").Value = ComboBox41.Text
End Sub
Private Sub ComboBox51_Change() 'üreten
TextBox110.Text = ComboBox51.Text
Range("DATA!X103").Value = ComboBox51.Text
End Sub
Private Sub ComboBox61_Change() 'test eden
TextBox111.Text = ComboBox61.Text
Range("DATA!F101").Value = ComboBox61.Text
End Sub
Private Sub ComboBox71_Change() 'tespit eden
TextBox112.Text = ComboBox71.Text
Range("DATA!J101").Value = ComboBox71.Text
End Sub
Private Sub ComboBox81_Change() 'tamir eden
TextBox113.Text = ComboBox81.Text
Range("DATA!H101").Value = ComboBox81.Text
End Sub
Private Sub ComboBox101_Change() 'cihaz tipi seçimi
TextBox114.Text = ComboBox101.Text
Range("DATA!T98").Value = ComboBox101.Text
End Sub
Private Sub CommandButton51_Click() 'tüm verileri temizleme
Dim ctrl As Control
For Each ctrl In UserForm1.Controls
If TypeName(ctrl) = "TextBox" Or TypeName(ctrl) = "ComboBox" Then
ctrl.Value = Empty
End If
Next ctrl
End Sub
Private Sub CommandButton61_Click() 'Kayıt silme
If Sayfa4.Range("A" & ActiveCell.Row).Text = TextBox101.Text Then If MsgBox("[ " & Cells(ActiveCell.Row, "A").Value & _
" ] SEÇTİĞİNİZ KAYDI TAMAMEN SİLECEKSİNİZ.EMİNMİSİNİZ?", vbYesNo + vbInformation, "SİL") = vbNo Then Exit Sub
Sayfa4.Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "M")).ClearContents
End Sub
Private Sub DTPicker3_exit(ByVal Cancel As MSForms.ReturnBoolean) 'giriş tarihi
TextBox102.Value = DTPicker3.Value
End Sub
Private Sub DTPicker4_exit(ByVal Cancel As MSForms.ReturnBoolean) 'çıkış tarihi
TextBox103.Value = DTPicker4.Value
End Sub
Private Sub OptionButton3_Click() 'cihaz yeni kayıt option butonu
If OptionButton3 = True Then
CommandButton101.Enabled = False
CommandButton21.Enabled = False
CommandButton41.Enabled = True
CommandButton51.Enabled = True
ComboBox11.Enabled = False
Label18.Enabled = False
DTPicker3.Enabled = True
DTPicker4.Enabled = True
TextBox103.Enabled = True
TextBox105.Enabled = True
TextBox106.Enabled = True
TextBox102.Enabled = True
TextBox107.Enabled = True
ComboBox21.Enabled = True
ComboBox31.Enabled = True
ComboBox41.Enabled = True
ComboBox51.Enabled = True
ComboBox61.Enabled = True
ComboBox71.Enabled = True
ComboBox81.Enabled = True
ComboBox91.Enabled = True
ComboBox101.Enabled = True
CommandButton61.Visible = False
End If
If OptionButton3.Value = True Then
Label19.Caption = "Yeni bir kayıt işlemini seçtiniz! Lütfen bilgileri tam ve doğru giriniz! Kayıt No hariç tüm bilgiler isteğe bağlı tanımlanabilir."
End If
End Sub
Private Sub OptionButton4_Click() 'cihaz bul-değiştir option butonu
If OptionButton4 = True Then
CommandButton101.Enabled = True
CommandButton21.Enabled = True
CommandButton41.Enabled = False
CommandButton51.Enabled = True
ComboBox11.Enabled = True
Label18.Enabled = True
DTPicker3.Enabled = True
DTPicker4.Enabled = True
TextBox103.Enabled = True
TextBox105.Enabled = True
TextBox106.Enabled = True
TextBox102.Enabled = True
TextBox107.Enabled = True
TextBox114.Enabled = True
ComboBox21.Enabled = True
ComboBox31.Enabled = True
ComboBox41.Enabled = True
ComboBox51.Enabled = True
ComboBox61.Enabled = True
ComboBox71.Enabled = True
ComboBox81.Enabled = True
ComboBox91.Enabled = True
ComboBox101.Enabled = True
CommandButton61.Visible = True
End If
If OptionButton4.Value = True Then
Label19.Caption = "Bul ve değiştir işlemini seçtiniz!" & "Kayıt No dan bulunacak/değiştirilecek kaydı/satırı seçiniz!" & "Bul butonuna basınız.Değiştirmek istediğiniz bilgiyi seçiniz/giriniz Değiştir butonuna basınız. " & "Lütfen bilgileri tam ve doğru giriniz!"
End If
End Sub
Private Sub CommandButton41_Click() 'KAYDET
Dim SAT As String
Dim i As Integer
TextBox101.Text = Sayfa4.Range("Q4")
If TextBox104.Value = "" Then
MsgBox "CİHAZ adı boş olamaz..!!" & vbLf & "Bir cihaz adı giriniz..!!", vbCritical, "DİKKAT"
TextBox104.SetFocus
Exit Sub
End If
If TextBox114.Value = "" Then
MsgBox "CİHAZ tipi boş olamaz..!!" & vbLf & "Bir cihaz atipi giriniz..!!", vbCritical, "DİKKAT"
TextBox114.SetFocus
Exit Sub
End If
If TextBox105.Value = "" Then
MsgBox "CİHAZ seri no boş olamaz..!!" & vbLf & "Bir cihaz seri nosu giriniz..!!", vbCritical, "DİKKAT"
TextBox105.SetFocus
Exit Sub
End If
If TextBox108.Value = "" Then
MsgBox "Arıza kodu boş olamaz..!!" & vbLf & "Bir arıza kodu giriniz..!!", vbCritical, "DİKKAT"
TextBox108.SetFocus
Exit Sub
End If
If TextBox113.Value = "" Then
MsgBox "Tamir eden boş olamaz..!!" & vbLf & "Bir tamir eden giriniz..!!", vbCritical, "DİKKAT"
TextBox113.SetFocus
Exit Sub
End If
If TextBox102.Value = "" Then
MsgBox "Giriş tarihi boş olamaz..!!" & vbLf & "Bir giriş tarihi giriniz..!!", vbCritical, "DİKKAT"
TextBox102.SetFocus
Exit Sub
End If
If TextBox103.Value = "" Then
MsgBox "Çıkış tarihi boş olamaz..!!" & vbLf & "Bir çıkış tarihi giriniz..!!", vbCritical, "DİKKAT"
TextBox103.SetFocus
Exit Sub
End If
If TextBox110.Value = "" Then
MsgBox "Üreten boş olamaz..!!" & vbLf & "Bir üreten giriniz..!!", vbCritical, "DİKKAT"
TextBox110.SetFocus
Exit Sub
End If
If TextBox109.Value = "" Then
MsgBox "Kontrol durumu boş olamaz..!!" & vbLf & "Bir kontrol durumu giriniz..!!", vbCritical, "DİKKAT"
TextBox109.SetFocus
Exit Sub
End If
SAT = Sayfa4.Cells(65536, "A").End(xlUp).Row + 1
For i = 1 To 14
Sayfa4.Cells(SAT, i).Value = Controls("TextBox" & i).Value
Controls("TextBox" & i).Value = ""
Next i
Sayfa4.Cells(SAT, "O").Value = TextBox113.Value
TextBox113.Value = ""
TextBox101.SetFocus
MsgBox "Kayıt girildi..!!", vbOKOnly + vbInformation, Application.UserName
Dim obj As Object
For Each obj In Me.Controls
If TypeName(obj) = "TextBox" Or TypeName(obj) = "ComboBox" Then
obj.Value = Empty
End If
Next
End Sub
Private Sub DTPicker3_Change() 'Giriş tarihi
TextBox102.Text = DTPicker3.Value
End Sub
Private Sub DTPicker4_Change() 'çıkış tarihi
TextBox103.Text = DTPicker4.Value
End Sub
Private Sub TextBox104_Change() 'cihaz ok işareti
If TextBox104.Text = "" Then
Image2.Visible = False
Else
Image2.Visible = True
End If
End Sub
Private Sub TextBox406_Change() 'arız ok işareti
If TextBox106.Text = "" Then
Image3.Visible = False
Else
Image3.Visible = True
End If
End Sub
'Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'Application.Visible = True
'End Sub
 
Son düzenleme:

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,057
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
m: ve n: yı prosedür dışına yazmışsınız. Eğer amacınız multipagenin sayfaları değiştiğinde bir başka prosedürü çalıştırmaksa direk prosedürün adını yazın. Örneğin,

Kod:
Private Sub MultiPage1_change()
If MultiPage1.Value = 0 Then
CommandButton1_Click
End If
If MultiPage1.Value = 1 Then
ComboBox11_CLICK
End If
End Sub
 

NBATMAN

Destek Ekibi
Destek Ekibi
Katılım
1 Aralık 2007
Mesajlar
639
Excel Vers. ve Dili
Office 2003 excel Türkçe
Çözüldü-Sayın Levent Bey,
Allah ne muradınız varsa versin inşallah, İnanınki yaklaşık 3 haftadır bu konu ile ilgili uğraşıyordum,Siz bizim işlerimizi kolayladınız , Allah da sizin işlerinizi kolaylasın.Siz bu işin pirisiniz...
 
Son düzenleme:

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,057
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Çözüldü-Sayın Levent Bey,
Allah ne muradınız varsa versin inşallah, İnanınki yaklaşık 3 haftadır bu konu ile ilgili uğraşıyordum,Siz bizim işlerimizi kolayladınız , Allah da sizin işlerinizi kolaylasın.Siz bu işin pirisiniz...
Sorunun çözüldüğüne sevindim. Güzel dilekleriniz nedeniyle de teşekkür ederim.
 
Katılım
18 Kasım 2011
Mesajlar
10
Excel Vers. ve Dili
2004 Almanca
teşekkürler...
 
Üst