• DİKKAT

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

Hata Nerede?

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
 

Merhum İdris SERDAR

Moderatör
Yönetici
Katılım
21 Ekim 2005
Mesajlar
17,093
Excel Vers. ve Dili
Excel, 365 - İngilizce
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.
 
Katılım
18 Haziran 2006
Mesajlar
112
Teşekkür Ederim Sayın Yurttaş...Kod başlıklarının çok önemli olduğunu daha iyi anladım.
 
Üst