Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The screen flickering and moving to different sheets might be caused by the excessive use of <code>Activate</code> and <code>Select</code>, two actions that are highly unnecessary in most cases, including this. Try the following modified code.</p> <pre><code>Private Sub ShowRanges1() Application.ScreenUpdating = False Call unprotect_sheet Dim i As Integer i = Me.ComboBox1.ListIndex Select Case i Case 0 Call Clear_ComboBox With Sheets("Overview").ComboBox Call unprotect_sheet .AddItem "All" .AddItem "Phase1" .AddItem "Phase2" .AddItem "Phase3" .AddItem "Phase4" .AddItem "Phase5" End With Sheets("Cover_Page").Range("F9").Value = "BPO" Sheets("Overview").Range("All").EntireRow.Hidden = False Sheets("Budget").Range("B5:D8").EntireRow.Hidden = False Case 1 Call Clear_ComboBox With Sheets("Overview").ComboBox Call unprotect_sheet .AddItem "All." .AddItem "Phase1" .AddItem "Phase2" .AddItem "Phase3" .AddItem "Phase4" End With Sheets("Cover_Page").Range("F9").Value = "IT" Sheets("Overview").Range("IT_Phase").EntireRow.Hidden = False Sheets("Overview").Range("Phase1").EntireRow.Hidden = True Sheets("Budget").Range("B5:D7").EntireRow.Hidden = False Sheets("Budget").Range("B8:D8").EntireRow.Hidden = True Case 2 Call Clear_ComboBox With Sheets("Overview").ComboBox Call unprotect_sheet .AddItem "Phase1" End With Sheets("Cover_Page").Range("F9").Value = "Purchase" Sheets("Overview").Range("Purchase_Phase").EntireRow.Hidden = False Sheets("Overview").Range("Phase2,Phase3,Phase4,Phase5").EntireRow.Hidden = True Sheets("Budget").Range("B5:D8").EntireRow.Hidden = True End Select Call protect_sheet Application.ScreenUpdating = True End Sub </code></pre> <p>It's basically the same code with all the <code>Activate</code> and <code>Select</code> removed and modified accordingly and properly.</p> <p>Let us know if this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload