Thema Datum  Von Nutzer Rating
Antwort
06.05.2014 12:02:35 Corina
NotSolved
06.05.2014 18:07:59 Gast40018
NotSolved
06.05.2014 21:05:58 Corina
NotSolved
Blau Immer noch ein Filterproblem, aber anders
06.05.2014 22:34:55 Gast40018
NotSolved
06.05.2014 22:41:56 Gast40018
NotSolved
07.05.2014 09:16:31 Corina
NotSolved
07.05.2014 11:04:57 Gast68435
NotSolved
07.05.2014 14:46:36 Corina
NotSolved
07.05.2014 15:28:59 Gast22596
NotSolved
07.05.2014 16:36:58 Corina
NotSolved
07.05.2014 17:02:26 Gast65946
NotSolved
08.05.2014 08:41:22 Corina
NotSolved
08.05.2014 14:04:56 Gast89195
*****
Solved
08.05.2014 14:34:50 Gast83579
NotSolved
08.05.2014 15:36:16 Corina
NotSolved
08.05.2014 16:41:00 Corina
NotSolved
08.05.2014 17:11:13 Gast1901
NotSolved
08.05.2014 19:16:53 Corina
NotSolved
08.05.2014 20:23:04 Gast31229
NotSolved
09.05.2014 13:36:57 Corina
NotSolved
09.05.2014 14:07:59 Gast21494
NotSolved

Ansicht des Beitrags:
Von:
Gast40018
Datum:
06.05.2014 22:34:55
Views:
882
Rating: Antwort:
  Ja
Thema:
Immer noch ein Filterproblem, aber anders

Hoi again,

hab Modul 5 mal angepasst (ModifyFilter).

Option Explicit

Private Const C_RGB_STATE1 As Long = &H8A5D38 ' ? "&H" & Hex$(RGB(56, 93, 138))
Private Const C_RGB_STATE2 As Long = &H50B000 ' ? "&H" & Hex$(RGB(0, 176, 80))

Public Sub RoundedRectangle_Click()
  'On click filter listed categories in "Risk Category Checklist" by the text in the rounded rectangles
  
  Dim ws As Excel.Worksheet
  Dim rngAutoFilter As Excel.Range
  Dim shp As Excel.Shape
  Dim strShapeText As String
  
  Set ws = Worksheets("Risk Category Checklist")
  Set rngAutoFilter = ws.Range("$A$5:$W$500")
  
  Set shp = ActiveSheet.Shapes(Application.Caller)
  strShapeText = shp.TextFrame2.TextRange.Text
  
  Call ToggleShapeColor
  
  Application.ScreenUpdating = False
  
  If shp.Fill.ForeColor.RGB = C_RGB_STATE2 Then
    
    'Select relevant column for filtering according to the shape's text
    Select Case strShapeText
      Case "Internal", "External", "Combination"
        Call ModifyFilter(rngAutoFilter, 4, strShapeText)
        
      Case "Financial", "Infrastructure", "Reputational", "Market"
        Call ModifyFilter(rngAutoFilter, 6, strShapeText)
        
      Case "Strategic", "Project-related", "Operational"
        Call ModifyFilter(rngAutoFilter, 11, strShapeText)
        
      Case Else
        MsgBox ("Please pick a specific risk cause driver, a risk event or the effect level!")
        
    End Select
  
  Else 'Unfilter
    
    Select Case strShapeText
      Case "Internal", "External", "Combination"
        Call ModifyFilter(rngAutoFilter, 4)
      
      Case "Financial", "Infrastructure", "Reputational", "Market"
        Call ModifyFilter(rngAutoFilter, 6)
      
      Case "Strategic", "Project-related", "Operational"
        Call ModifyFilter(rngAutoFilter, 11)
      
      Case Else
        MsgBox ("Please pick a specific risk cause driver, a risk event or the effect level!")
        
    End Select
  End If
  
  Application.ScreenUpdating = True
  
End Sub
 
Private Sub ToggleShapeColor()
'Change shape color on click in sheet "Checklist Structure"
  Dim shp As Shape
  Set shp = ActiveSheet.Shapes(Application.Caller)
  With shp.Fill
    If .ForeColor.RGB = C_RGB_STATE1 Then
      .ForeColor.RGB = C_RGB_STATE2
    Else
      .ForeColor.RGB = C_RGB_STATE1
    End If
  End With
End Sub

Gruß, Trägheit - so nenn ich mich an "trippwütigen" Tagen. ;)


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
06.05.2014 12:02:35 Corina
NotSolved
06.05.2014 18:07:59 Gast40018
NotSolved
06.05.2014 21:05:58 Corina
NotSolved
Blau Immer noch ein Filterproblem, aber anders
06.05.2014 22:34:55 Gast40018
NotSolved
06.05.2014 22:41:56 Gast40018
NotSolved
07.05.2014 09:16:31 Corina
NotSolved
07.05.2014 11:04:57 Gast68435
NotSolved
07.05.2014 14:46:36 Corina
NotSolved
07.05.2014 15:28:59 Gast22596
NotSolved
07.05.2014 16:36:58 Corina
NotSolved
07.05.2014 17:02:26 Gast65946
NotSolved
08.05.2014 08:41:22 Corina
NotSolved
08.05.2014 14:04:56 Gast89195
*****
Solved
08.05.2014 14:34:50 Gast83579
NotSolved
08.05.2014 15:36:16 Corina
NotSolved
08.05.2014 16:41:00 Corina
NotSolved
08.05.2014 17:11:13 Gast1901
NotSolved
08.05.2014 19:16:53 Corina
NotSolved
08.05.2014 20:23:04 Gast31229
NotSolved
09.05.2014 13:36:57 Corina
NotSolved
09.05.2014 14:07:59 Gast21494
NotSolved