- Katılım
- 29 Kasım 2008
- Mesajlar
- 215
- Excel Vers. ve Dili
- excel 2003 türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error GoTo son
If Intersect(Target, [b3:b1000]) Is Nothing Then Exit Sub
dosya1 = ThisWorkbook.Name
dosya2 = Target.Value & ".xls"
Set s1 = Sheets("Veri")
Set s2 = Sheets("Liste")
Application.ScreenUpdating = False
Dosya_Yolu = "C:\Users\MEHMET KOCA\Desktop\Yedek" & "\" & dosya2
Workbooks.Open Filename:=Dosya_Yolu
s1.Range("b1:b4").ClearContents
s1.Range("f1:f2").ClearContents
s1.Range("a7:h23").ClearContents
Workbooks(dosya1).Sheets("Veri").Range("b1:b4").Value = Workbooks(dosya2).Sheets("Veri").Range("b1:b4").Value
Workbooks(dosya1).Sheets("Veri").Range("f1:f2").Value = Workbooks(dosya2).Sheets("Veri").Range("f1:f2").Value
Workbooks(dosya1).Sheets("Veri").Range("a7:h23").Value = Workbooks(dosya2).Sheets("Veri").Range("a7:h23").Value
ActiveWorkbook.Close False
Application.ScreenUpdating = True
s1.Select
s1.[b1].Select
MsgBox "Aktarma gerçekleşti..!!", vbOKOnly + vbInformation, "AKTARMA"
son:
If Err.Number <> 0 Then MsgBox "Aktarmada Hata Oluştu.", vbInformation, "Bilgi"
Set s1 = Nothing
Set s2 = Nothing
End Sub
Sub Liste_Aktar()
On Error GoTo son
Set s1 = Sheets("Veri")
Set s2 = Sheets("Liste")
With s2.Range("b3:b1000")
Set Bul = .Find(s1.[b1], LookIn:=xlValues, LookAt:=xlWhole)
If Not Bul Is Nothing Then
s2.Cells(Bul.Row, 2).Value = s1.Cells(1, 2).Value
s2.Cells(Bul.Row, 3).Value = s1.Cells(2, 2).Value
s2.Cells(Bul.Row, 4).Value = s1.Cells(3, 2).Value
s2.Cells(Bul.Row, 5).Value = s1.Cells(4, 2).Value
s2.Cells(Bul.Row, 6).Value = s1.Cells(1, 6).Value
s2.Cells(Bul.Row, 7).Value = s1.Cells(2, 6).Value
s2.Cells(Bul.Row, 8).Value = s1.Cells(24, 8).Value
s2.Cells(Bul.Row, 9).Value = s1.Cells(25, 8).Value
MsgBox "Verileriniz Başarıyla Güncellenmiştir.", vbInformation, "Bilgi"
Else
sat = s2.[a65536].End(xlUp).Row + 1
s2.Cells(sat, 1).Value = sat - 2
s2.Cells(sat, 2).Value = s1.Cells(1, 2).Value
s2.Cells(sat, 3).Value = s1.Cells(2, 2).Value
s2.Cells(sat, 4).Value = s1.Cells(3, 2).Value
s2.Cells(sat, 5).Value = s1.Cells(4, 2).Value
s2.Cells(sat, 6).Value = s1.Cells(1, 6).Value
s2.Cells(sat, 7).Value = s1.Cells(2, 6).Value
s2.Cells(sat, 8).Value = s1.Cells(24, 8).Value
s2.Cells(sat, 9).Value = s1.Cells(25, 8).Value
MsgBox "Verileriniz Başarıyla Eklenmiştir.", vbInformation, "Bilgi"
End If
End With
son:
If Err.Number <> 0 Then MsgBox "Aktarmada Hata Oluştu.", vbInformation, "Bilgi"
Set s1 = Nothing
Set s2 = Nothing
End Sub