Michael Keith
asked on
Why Application.ScreenUpdating code not working
I have the following code in an excel worksheet
Private Sub Show_Hide_Subtotal_Click()
Application.ScreenUpdating = False
If Show_Hide_Subtotal.Caption = "Hide Sub-total" Then
Sheets("Projections").Sele ct
ActiveSheet.Range("J:J").E ntireColum n.Hidden = True
Show_Hide_Subtotal.Caption = "Show Sub-total"
Else
Sheets("Projections").Sele ct
ActiveSheet.Range("J:J").E ntireColum n.Hidden = False
Show_Hide_Subtotal.Caption = "Hide Sub-total"
End If
Application.ScreenUpdating = True
End Sub
Private Sub Show_Hide_Subtotal_Click()
Application.ScreenUpdating
If Show_Hide_Subtotal.Caption
Sheets("Projections").Sele
ActiveSheet.Range("J:J").E
Show_Hide_Subtotal.Caption
Else
Sheets("Projections").Sele
ActiveSheet.Range("J:J").E
Show_Hide_Subtotal.Caption
End If
Application.ScreenUpdating
End Sub
Hi, Apex623.
Your code is working fine for me - please see attached.
In this example, turning off screen updating doesn't make any difference, so i presume that your real version must be doing other things. Please post all the code here.
Thanks,
Brian.ShowHide.xls
Your code is working fine for me - please see attached.
In this example, turning off screen updating doesn't make any difference, so i presume that your real version must be doing other things. Please post all the code here.
Thanks,
Brian.ShowHide.xls
ASKER
Sorry I meant to say that the Application.Screenupdating is not working. It shows the sheet being selected and I do not want that to happen. I have posted the whole spreadsheet that I am working on. The button that executes the code is on the "Proj. Assumptions" tab. Thanks for the posts.
Client-Proforma.xlsm
Client-Proforma.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help!
Thanks, Apex623!