• DİKKAT

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

excel makro kütüphanesine, sayfa içine yazılan makro nasıl eklerim

Erdem Akdemir

Destek Ekibi
Destek Ekibi
Katılım
4 Mayıs 2007
Mesajlar
3,677
Excel Vers. ve Dili
2016 PRO TÜRKÇE-İNG. 64 BİT
muhasebe programından rapor çekiyorum ve çektiğim raporları sunum yapmak üzere excel'de düzenlemesini yapıyorum

düzenlemeleri devamlı yapmamak içinde, makroları kullandım

muhasebe programından çektiğim dosyalar, devamlı değiştiği için

aşağıdaki koddaki gibi anlık değişikliğe tepki verecek, bir kodu yazamıyorum

excel kütüphanesinde böyle bir kodu nasıl eklerim

not: 1.kodu 2.kodun içine nasıl eklemem lazım

Kod:
Private Sub Worksheet_Calculate()
MsgBox Format([F65536].End(3), "###,##.00")
End Sub

Kod:
Sub tahsilatd()
Dim i As Long
For i = [r65536].End(3).Row To 2 Step -1
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Fatura Ödemesi" Then
Cells(i, "n") = "F"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Bağlantı Bedeli Ödemesi" Then
Cells(i, "n") = "B"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Güvence Bedeli Ödemesi" Then
Cells(i, "n") = "G"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Nakit Tahsilat" Then
Cells(i, "n") = "PO"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Ön Ödemeli Abone Fatura Ödemesi" Then
Cells(i, "n") = "ÖÖ"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Damga Vergisi Tahsilat(BB)" Then
Cells(i, "n") = "BB"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "[GB ]Damga Vergisi Tahsilatı" Then
Cells(i, "n") = "GB"
End If
If Cells(i, "r") = "MERKEZ YTL KASA" And Cells(i, "m") = "Bağlantı Bedeli Gecikme Tahsilatı" Then
Cells(i, "n") = "BBG"
End If

Next i

Columns("a:c").Delete Shift:=xlToLeft
Columns("F:I").Delete Shift:=xlToLeft
Columns("h:q").Delete Shift:=xlToLeft
[g1] = "İ.T"
    Columns("C:C").Cut
    Columns("A:A").Insert
    Columns("F:F").Cut
    Columns("B:B").Insert
     Columns("F:F").Cut
    Columns("c:c").Insert
    Columns("f").NumberFormat = "#,##0.00"

Range("A1").Select
Selection.AutoFilter Field:=1, Criteria1:="Tarih"
ActiveSheet.ShowAllData
 

    
          With ActiveSheet.PageSetup
   

        .LeftMargin = Application.InchesToPoints(0.59748031496063)
        .RightMargin = Application.InchesToPoints(0.59748031496063)
        .CenterHorizontally = True

        End With
        
sat = [A65536].End(3).Row + 3
Cells(sat, "e") = ""
Cells(sat, "f") = ""

        
Cells(sat, "e") = "TOPLAM"
Cells(sat, "f").FormulaR1C1 = "=SUBTOTAL(9,R2C:R[-2]C)"
Cells(sat, "f").font.Bold = True
Cells(sat, "e").font.Bold = True
 
Cells.Select
Cells.EntireColumn.AutoFit
    ActiveSheet.PageSetup.PrintArea = "$A$1:$F$" & [f65536].End(3).Row
      Columns("e:e").ColumnWidth = 13
    Range("A1").Select
End Sub
 
bu işlemin oluru yok mu arkadaşlar ?
 
Merhaba
diğer kod içine eklenecek kodları bir procudure nin içine yazıp sonra bu procudure çalışması istediğiniz diğer kodların içinde nerde çalışmasını isyorsunuz orda çağırsanız ( Call )?
 
Geri
Üst