Solved

Why Application.ScreenUpdating code not working

Posted on 2013-01-14
7
543 Views
Last Modified: 2013-01-23
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").Select
        ActiveSheet.Range("J:J").EntireColumn.Hidden = True
        Show_Hide_Subtotal.Caption = "Show Sub-total"
    Else
       
        Sheets("Projections").Select
        ActiveSheet.Range("J:J").EntireColumn.Hidden = False
        Show_Hide_Subtotal.Caption = "Hide Sub-total"
    End If
    Application.ScreenUpdating = True
End Sub
0
Comment
Question by:Apex623
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 48

Expert Comment

by:Martin Liss
ID: 38778410
I have the following code in an excel worksheet
and…?
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38778531
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
0
 
LVL 1

Author Comment

by:Apex623
ID: 38779165
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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Accepted Solution

by:
redmondb earned 400 total points
ID: 38779204
Apex623,

Do you mean that you don't want the "Projections" sheet displayed? If so, then please see the attached.

Regards,
Brian.Client-Proforma-V2.xlsm
0
 
LVL 1

Author Closing Comment

by:Apex623
ID: 38812383
Thanks for your help!
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38812468
Thanks, Apex623!
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question