• DİKKAT

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

Hata Nerede?

  • Konbuyu başlatan Konbuyu başlatan RIKU
  • Başlangıç tarihi Başlangıç tarihi
Katılım
18 Haziran 2006
Mesajlar
112
Arkadaşlar bo kodlarda ne eksik anlayamadım. Bir sayfada otomatik olarak açlışmasını istiyorum, başka bir sayfada eklenene verilere bağlı olarak bu kos-dların otomatik olarak çalışmasını istiyorum ama sanırım birşey eksik, yardımcı olursanız sevinirim. :)

Sub MAKRO1()

Range("G7").Select
ActiveSheet.PivotTables("Özet Tablo 1").RefreshTable
Range("G2:G11").Select
Selection.Sort Key1:="R2C7", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
Range("J2:J11").Select
Selection.Sort Key1:="R2C10", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
Range("I2:I11").Select
Selection.Sort Key1:="R2C9", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
End Sub
 
Kodlarınızı Özet tablonun olduğu sayfanın kod bölümüne artık hangisi size uygunsa;

Private Sub Worksheet_Activate()
Range("G7").Select
ActiveSheet.PivotTables("Özet Tablo 1").RefreshTable
Range("G2:G11").Select
Selection.Sort Key1:="R2C7", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
Range("J2:J11").Select
Selection.Sort Key1:="R2C10", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
Range("I2:I11").Select
Selection.Sort Key1:="R2C9", Order1:=xlDescending, Type:=xlSortValues, _
OrderCustom:=1, Orientation:=xlTopToBottom
End Sub

gibi bu kodları;
Private Sub Worksheet_Calculate()


Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)



Private Sub Worksheet_SelectionChange(ByVal Target As Range)

herhangi birisinin altına yazın.
 
Teşekkür Ederim Sayın Yurttaş...Kod başlıklarının çok önemli olduğunu daha iyi anladım.
 
Geri
Üst