C
CLR
I received a workbook today to edit and it contains a situation I do not
understand. It has what appears to be a simple Autofilter macro, but when
initiated, it does something besides what it appears to be meant to do. The
code is in English, "mostly", but the comments are in what appears to me to
be German, which I don't understand. I have included the entire macro
below, with all comments in hopes someone can explain what might be
happening.
When initiated, the macro seems to "freeze" rows 1:7, (without really
freezing them), and appears to filter on column F, (not field 1 as suggested
in the code), for only numeric items, and also returns the sub header rows
the items are situated in as well as the rows which have numbers in columnF,
and also returns rows 221:228 which contain summary formulas, sort of like a
footer but not really cause there is also a real footer........and the
display is in the "Page break view"..........obviously there is much more
code going on, but I sure can't find it.......no other visible modules or
change-event code that I can see.................can there be other hidden
code that I don't know where to look? And what in the heck is an
"Anzeigen"?
'**********************************************************
' Selektion_anzeigen Makro
' Makro am 22.07.2003 von MW aufgezeigt
'
' sollte die Selektion per Makro nicht mehr funktionieren, so hat vermutlich
' jemand mit DATEN-FILTER-AUTO FILTER gearbeitet und dann die Arbeitsmappe
' gespeichert
' => auf die Spalte Q muß ein AutoFilter mit "Alle" gelegt sein
'
Sub Selektion_anzeigen()
'
' die "zerquetschte" Spalte Q enthält die Formel
' =WENN(SUMME(G9:H12)>0;"Anzeigen";"nicht Anzeigen");
' auf diese Spalte Q ist ein AutoFilter gelegt, der
' mit diesem Makro aktiviert wird
Application.Goto reference:="r1c1"
Selection.AutoFilter field:=1, Criteria1:="Anzeigen"
End Sub
'************************************************************
Any suggestions would me much appreciated.........
Vaya con Dios,
Chuck, CABGx3
understand. It has what appears to be a simple Autofilter macro, but when
initiated, it does something besides what it appears to be meant to do. The
code is in English, "mostly", but the comments are in what appears to me to
be German, which I don't understand. I have included the entire macro
below, with all comments in hopes someone can explain what might be
happening.
When initiated, the macro seems to "freeze" rows 1:7, (without really
freezing them), and appears to filter on column F, (not field 1 as suggested
in the code), for only numeric items, and also returns the sub header rows
the items are situated in as well as the rows which have numbers in columnF,
and also returns rows 221:228 which contain summary formulas, sort of like a
footer but not really cause there is also a real footer........and the
display is in the "Page break view"..........obviously there is much more
code going on, but I sure can't find it.......no other visible modules or
change-event code that I can see.................can there be other hidden
code that I don't know where to look? And what in the heck is an
"Anzeigen"?
'**********************************************************
' Selektion_anzeigen Makro
' Makro am 22.07.2003 von MW aufgezeigt
'
' sollte die Selektion per Makro nicht mehr funktionieren, so hat vermutlich
' jemand mit DATEN-FILTER-AUTO FILTER gearbeitet und dann die Arbeitsmappe
' gespeichert
' => auf die Spalte Q muß ein AutoFilter mit "Alle" gelegt sein
'
Sub Selektion_anzeigen()
'
' die "zerquetschte" Spalte Q enthält die Formel
' =WENN(SUMME(G9:H12)>0;"Anzeigen";"nicht Anzeigen");
' auf diese Spalte Q ist ein AutoFilter gelegt, der
' mit diesem Makro aktiviert wird
Application.Goto reference:="r1c1"
Selection.AutoFilter field:=1, Criteria1:="Anzeigen"
End Sub
'************************************************************
Any suggestions would me much appreciated.........
Vaya con Dios,
Chuck, CABGx3