tmd63
New Member
- Joined
- Feb 21, 2014
- Messages
- 40
- Office Version
- 2013
- 2003 or older
- Platform
- 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.
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).
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: