Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ??? application.screenupdating no longer works! Why???

I am getting a bit frustrated. I found this question in several places, but
no answers. Please help!

The command: "application.screenupdating = false" no longer works. I
restarted my computer and restarted Excel. I opened a new workbook, and typed
in a test macro.

sub test()
application.screenupdating = false
....

No matter what I do, I can no longer get screen updating to stop.

I was running a macro that opens a *.wk3 file, copies info into a *.xls
file, and continues with the next .wk3 file. When I am done, I have a neat
list of information in Excel compiled from 3,500 .wk3 files.

To speed things, I used at the beginning of my code:
application.screenupdating = false

It worked beautifully for a while. However, some .wk3 files contained an
error in a specific cell and would stop until I responded to the alert.

To avoid the annoying alert, I used this:

on error resume next
application. displayalerts = false

Maybe this caused a problem?

Thanks for your help.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default ??? application.screenupdating no longer works! Why???

All I can suggest is that you debug the line of code that is causing the
value to change. Set up a watch expression on Application.ScreenUpdating and
ask it to stop when the value changes.

Alok

"CraTaw" wrote:

I am getting a bit frustrated. I found this question in several places, but
no answers. Please help!

The command: "application.screenupdating = false" no longer works. I
restarted my computer and restarted Excel. I opened a new workbook, and typed
in a test macro.

sub test()
application.screenupdating = false
...

No matter what I do, I can no longer get screen updating to stop.

I was running a macro that opens a *.wk3 file, copies info into a *.xls
file, and continues with the next .wk3 file. When I am done, I have a neat
list of information in Excel compiled from 3,500 .wk3 files.

To speed things, I used at the beginning of my code:
application.screenupdating = false

It worked beautifully for a while. However, some .wk3 files contained an
error in a specific cell and would stop until I responded to the alert.

To avoid the annoying alert, I used this:

on error resume next
application. displayalerts = false

Maybe this caused a problem?

Thanks for your help.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ??? application.screenupdating no longer works! Why???

I followed your suggestion to set a watch for a change and ran the following
code.

Sub test()
Application.ScreenUpdating = False
Range("a1") = "aaa:"
MsgBox (Application.ScreenUpdating)
Application.ScreenUpdating = True
End Sub

The results:
The messagebox said "False" as expected. The watch stopped at each
screenupdating call, to signal that a change had occurred; again as expected.

However, something is badly messed up. I stepped through the test code to
see what I could find. After executing "Application.ScreenUpdating = False",
I hovered my mouse over "Application.ScreenUpdating" and it said "True". Very
strange!?! After it executed the next line [Range("a1") = "aaa:"], it
immediately updated the screen. Now that's bad!?!

So now I'm wondering what is going on. Any help will be appreciated.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default ??? application.screenupdating no longer works! Why???

There is a difference between running code in Debug from the VBE and running
normally whilst looking at Excel.
AFAIK, VBE can reset the ScreenUpdating to True whilst debugging, otherwise
you cannot see what happened.
Run the code normally and see the difference.
You would of course need some code that would actually be noticably
different with ScreenUpdating=True or False.

NickHK

"CraTaw" wrote in message
...
I followed your suggestion to set a watch for a change and ran the

following
code.

Sub test()
Application.ScreenUpdating = False
Range("a1") = "aaa:"
MsgBox (Application.ScreenUpdating)
Application.ScreenUpdating = True
End Sub

The results:
The messagebox said "False" as expected. The watch stopped at each
screenupdating call, to signal that a change had occurred; again as

expected.

However, something is badly messed up. I stepped through the test code to
see what I could find. After executing "Application.ScreenUpdating =

False",
I hovered my mouse over "Application.ScreenUpdating" and it said "True".

Very
strange!?! After it executed the next line [Range("a1") = "aaa:"], it
immediately updated the screen. Now that's bad!?!

So now I'm wondering what is going on. Any help will be appreciated.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default ??? application.screenupdating no longer works! Why???

Hi,

I agree with you that you get a wrong value in the tool tip when you hover
over the Application.ScreenUpdating in your code. However, you do get the
correct indications when you display the value of Application.ScreenUpdating
in the Watch window.
Your main objective is to identify the reason why Application.ScreenUpdating
is being turned back to True at some stage of your processing. I would still
suggest that you set a watch (Break When Value Changes) and examine your
code. Obviously to begin with the Application.ScreenUpdating will be true.
The code should stop once when you turn it off before your main processing
begins. At that time you should let the code proceed by pressing F5. You just
needs to watch the line of code at which the value changes again from False
to True.

Alok
"CraTaw" wrote:

I followed your suggestion to set a watch for a change and ran the following
code.

Sub test()
Application.ScreenUpdating = False
Range("a1") = "aaa:"
MsgBox (Application.ScreenUpdating)
Application.ScreenUpdating = True
End Sub

The results:
The messagebox said "False" as expected. The watch stopped at each
screenupdating call, to signal that a change had occurred; again as expected.

However, something is badly messed up. I stepped through the test code to
see what I could find. After executing "Application.ScreenUpdating = False",
I hovered my mouse over "Application.ScreenUpdating" and it said "True". Very
strange!?! After it executed the next line [Range("a1") = "aaa:"], it
immediately updated the screen. Now that's bad!?!

So now I'm wondering what is going on. Any help will be appreciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
application screenupdating issue Gary Keramidas Excel Programming 4 March 11th 06 02:45 AM
PLEASE PLEASE HELP Application.Screenupdating modjoe23[_6_] Excel Programming 3 September 3rd 05 05:08 AM
Application.ScreenUpdating MsgBox MichaelC Excel Programming 3 June 15th 05 12:51 AM
Application.ScreenUpdating problem jkitzy Excel Programming 3 January 12th 05 09:27 PM
Question on application.screenupdating augustus Excel Programming 2 December 18th 04 01:35 AM


All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"