更快地运行 Excel 宏?

更快地运行 Excel 宏?

我正在尝试运行这个宏,它可以工作,但是,它需要花费太多时间,比如 3 分钟。

刷新按钮应该隐藏空行并显示工作表中的某些形状。

参见附加代码:

Sub Refresh()
On Error Resume Next

Application.ScreenUpdating = False

Worksheets("Dashboard-Data").Rows.EntireRow.Hidden = False
     
ltrw = Cells(Rows.Count, "B").End(xlUp).Row

For i = 18 To ltrw
 
If Cells(i, 3).Value <> "Enter Task Name" Then
Cells(i, 2).EntireRow.Hidden = False
   
ElseIf Cells(i, 2).Value = Range("B114").Value Then
Cells(i, 2).EntireRow.Hidden = True

ElseIf Cells(i, 3).Value = "Enter Task Name" Then
Cells(i, 2).EntireRow.Hidden = True


  Else
   
    Cells.EntireRow.Hidden = False
     
     End If
     Next i
    With Sheets("Dashboard-Data")
    
    colorss = Cells(Rows.Count, "Q").End(xlUp).Row
    For c = 2 To colorss
           
      If Cells(c, 17).Value = "In Progress" And InStr(1, Cells(c, 3).Value, "Total") > 0 Then
     
      .Shapes("Rectangle: Rounded Corners 2072").Fill.ForeColor.RGB = RGB(255, 255, 175)
     'ActiveSheet.Shapes("Rectangle: Rounded Corners 2072").Line.Weight = 1
      .Shapes("Rectangle: Rounded Corners 2072").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
   
      .Shapes("Rectangle: Rounded Corners 171").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 171").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 179").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 179").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 187").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 187").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
     .Shapes("Rectangle: Rounded Corners 178").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 178").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 168").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 168").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2047").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2047").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2048").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2048").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 170").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 170").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 176").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 176").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2050").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2050").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2051").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2051").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2073").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2073").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 184").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 184").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2053").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2053").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2054").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2054").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 190").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 190").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 186").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 186").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2052").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2052").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2049").Fill.ForeColor.RGB = RGB(255, 255, 175)
      .Shapes("Rectangle: Rounded Corners 2049").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      
      ElseIf Cells(c, 17).Value = "Completed" And InStr(1, Cells(c, 3).Value, "Total") > 0 Then
     
      
      .Shapes("Rectangle: Rounded Corners 2072").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2072").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
     
      .Shapes("Rectangle: Rounded Corners 171").Fill.ForeColor.RGB = RGB(206, 249, 203)
     .Shapes("Rectangle: Rounded Corners 171").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 179").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 179").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 187").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 187").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
     .Shapes("Rectangle: Rounded Corners 178").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 178").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 168").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 168").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2047").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2047").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2048").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2048").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 170").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 170").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
     .Shapes("Rectangle: Rounded Corners 176").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 176").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
            
      .Shapes("Rectangle: Rounded Corners 2050").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2050").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2051").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2051").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2073").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2073").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 184").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 184").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2053").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2053").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2054").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2054").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 190").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 190").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 186").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 186").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2052").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2052").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2049").Fill.ForeColor.RGB = RGB(206, 249, 203)
      .Shapes("Rectangle: Rounded Corners 2049").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
     
    ElseIf Cells(c, 17).Value = "Pending" And InStr(1, Cells(c, 3).Value, "Total") > 0 Then
     
      
      .Shapes("Rectangle: Rounded Corners 2072").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2072").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 171").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 171").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 179").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 179").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 187").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 187").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 178").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 178").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 168").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 168").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2047").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2047").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2048").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2048").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 170").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 170").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 176").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 176").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2050").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2050").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2051").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2051").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2073").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2073").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 184").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 184").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2053").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2053").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2054").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2054").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 190").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 190").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 186").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 186").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
                  
      .Shapes("Rectangle: Rounded Corners 2052").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2052").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
      .Shapes("Rectangle: Rounded Corners 2049").Fill.ForeColor.RGB = RGB(255, 133, 133)
      .Shapes("Rectangle: Rounded Corners 2049").TextFrame.Characters.Font.Color = RGB(34, 42, 53)
      
    Else
      
      .Shapes("Rectangle: Rounded Corners 2072").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2072").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 171").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 171").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
              
      .Shapes("Rectangle: Rounded Corners 179").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 179").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 187").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 187").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 178").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 178").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 168").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 168").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2047").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2047").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2048").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2048").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 170").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 170").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 176").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 176").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2050").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2050").TextFrame.Characters.Font.Color = RGB(242, 242, 242)

      .Shapes("Rectangle: Rounded Corners 2051").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2051").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2073").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2073").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 184").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 184").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2053").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2053").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2054").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2054").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 190").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 190").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 186").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 186").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2052").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2052").TextFrame.Characters.Font.Color = RGB(242, 242, 242)
      
      .Shapes("Rectangle: Rounded Corners 2049").Fill.ForeColor.RGB = RGB(34, 42, 53)
      .Shapes("Rectangle: Rounded Corners 2049").TextFrame.Characters.Font.Color = RGB(242, 242, 242)

End If
Next c
   
   
If .Shapes("Rectangle: Rounded Corners 2072").TextFrame.Characters.Text = "Project 1" Then
.Shapes("Rectangle: Rounded Corners 2072").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2072").Visible = True
End If


If .Shapes("Rectangle: Rounded Corners 171").TextFrame.Characters.Text = "Project 2" Then
.Shapes("Rectangle: Rounded Corners 171").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 171").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 179").TextFrame.Characters.Text = "Project 3" Then
.Shapes("Rectangle: Rounded Corners 179").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 179").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 187").TextFrame.Characters.Text = "Project 4" Then
.Shapes("Rectangle: Rounded Corners 187").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 187").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 178").TextFrame.Characters.Text = "Project 5" Then
.Shapes("Rectangle: Rounded Corners 178").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 178").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 168").TextFrame.Characters.Text = "Project 6" Then
.Shapes("Rectangle: Rounded Corners 168").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 168").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2047").TextFrame.Characters.Text = "Project 7" Then
.Shapes("Rectangle: Rounded Corners 2047").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2047").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2048").TextFrame.Characters.Text = "Project 8" Then
.Shapes("Rectangle: Rounded Corners 2048").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2048").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 170").TextFrame.Characters.Text = "Project 9" Then
.Shapes("Rectangle: Rounded Corners 170").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 170").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 176").TextFrame.Characters.Text = "Project 10" Then
.Shapes("Rectangle: Rounded Corners 176").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 176").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2050").TextFrame.Characters.Text = "Project 11" Then
.Shapes("Rectangle: Rounded Corners 2050").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2050").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2051").TextFrame.Characters.Text = "Project 12" Then
.Shapes("Rectangle: Rounded Corners 2051").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2051").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2073").TextFrame.Characters.Text = "Project 13" Then
.Shapes("Rectangle: Rounded Corners 2073").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2073").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 184").TextFrame.Characters.Text = "Project 14" Then
.Shapes("Rectangle: Rounded Corners 184").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 184").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2053").TextFrame.Characters.Text = "Project 15" Then
.Shapes("Rectangle: Rounded Corners 2053").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2053").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2054").TextFrame.Characters.Text = "Project 16" Then
.Shapes("Rectangle: Rounded Corners 2054").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2054").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 190").TextFrame.Characters.Text = "Project 17" Then
.Shapes("Rectangle: Rounded Corners 190").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 190").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 186").TextFrame.Characters.Text = "Project 18" Then
.Shapes("Rectangle: Rounded Corners 186").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 186").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2052").TextFrame.Characters.Text = "Project 19" Then
.Shapes("Rectangle: Rounded Corners 2052").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2052").Visible = True
End If

If .Shapes("Rectangle: Rounded Corners 2049").TextFrame.Characters.Text = "Project 20" Then
.Shapes("Rectangle: Rounded Corners 2049").Visible = False
Else
.Shapes("Rectangle: Rounded Corners 2049").Visible = True
End If

End With

Application.ScreenUpdating = True

End Sub

相关内容