- Katılım
- 3 Mart 2009
- Mesajlar
- 519
- Excel Vers. ve Dili
- excel 2003 tr
Dosyanız ektedir.
Kod:Private Sub CommandButton1_Click() Dim wb As Workbook, sh As Worksheet, sat As Long If TextBox1.Text & TextBox2.Text & TextBox3.Text = "" Then MsgBox "hiç veri girmediniz" Exit Sub End If a = MsgBox(TextBox1.Text & " Bu kayıtı yapmak istiyormusunuz. ", vbYesNo + vbInformation, c & " Rapor aktarımı") If a = vbNo Then Exit Sub End If Application.DisplayAlerts = False If Workbooks.Open(ThisWorkbook.Path & "\" & ComboBox1.Value).ReadOnly = True _ Then Workbooks(ComboBox1.Value).Close False Application.DisplayAlerts = True Set wb = Workbooks(ComboBox1.Value) Set sh = wb.Sheets("data") sat = sh.Cells(65536, "A").End(xlUp).Row + 1 If sat >= 65533 Then MsgBox wb.Name & " İsimli dosyada sayfa dolduğu için kayıt yapılmadı." wb.Close False Exit Sub End If sh.Cells(sat, "A").Value = CDate(TextBox1.Text) sh.Cells(sat, "A").NumberFormat = "dd.mm.yyyy" sh.Cells(sat, "B").Value = TextBox2.Text sh.Cells(sat, "C").Value = CDbl(TextBox3.Text) sh.Cells(sat, "C").NumberFormat = "#,##0.00" sh.Cells(sat, "D").Value = CDbl(TextBox4.Text) sh.Cells(sat, "D").NumberFormat = "#,##0.00" wb.Close True MsgBox "[ " & ComboBox1.Value & " ] isimli dosyaya kayıt başarı ile girildi." & vbLf & _ "evrengizlen@hotmail.com", vbOKOnly + vbInformation, "E V R E N" Set sh = Nothing Set wb = Nothing Unload Me End Sub
peki üstadım aynı şekilde verileri nasıl sileriz ?
