screen not updating cells

tmd63

New Member
Joined
Feb 21, 2014
Messages
40
Office Version
  1. 2013
  2. 2003 or older
Platform
  1. Windows
I have a process button control that is supposed to clear a cell and format then change the status bar then open a remote sheet for copying.

Code:
    Application.ScreenUpdating = True    
    Worksheets("Main").Select
    Range("I12").Clear
    oldStatusBar = Application.DisplayStatusBar
    Application.DisplayStatusBar = True
    Application.StatusBar = "Please be patient... Copying Lookup"
    Application.ScreenUpdating = False
    
    Workbooks.Open ("http://*******.***.com/sites/***/***/Shared%20Documents/*******/Lookup.xls")

When I run the code from the debugger, step by step, it all works fine. But when I run it normally, the Range("I12").Clear does not work?
The status bar updates and the file is copied. It just does not clear the completed cell.

Can anyone tell me why and how do I get the cell to clear while it is running the long code (it takes 10-20 minutes to load, sort and copy the file as it is a large file).
 
Last edited:
If I remove both Application.ScreenUpdating entries, then it does clear the cell but displays the opened workbook (this is not a desirable requirement as I do not want the user to see the table being loaded).
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top