Solved

Why Application.ScreenUpdating code not working

Posted on 2013-01-14
7
527 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
  • 3
  • 2
7 Comments
 
LVL 46

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

912 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now