Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default Why does Selection.PasteSpecial toggle Application.ScreenUpdating

What version of xl are you using?

I can't emulate the problem in either xl2007 or xl2002.

I copied your code exactly and renamed a worksheet to Viewer and even
inserted a volatile formula with RANDBETWEEN in M11 and there is definitely
no screen updating until after the code is finished.

I tested with Application.ScreenUpdating = False inserted both before and
after the worksheet selection line.

Can you see if Range("M13:M204") is actually updated while the Point 2
msgbox is still displayed?

--
Regards,

OssieMac


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Why does Selection.PasteSpecial toggle Application.ScreenUpdating

I am running Microsoft Excel 2003 SP3 with Windows XP Pro SP2. Yes, the
range is actually being updated.

OssieMac wrote:
What version of xl are you using?

I can't emulate the problem in either xl2007 or xl2002.

I copied your code exactly and renamed a worksheet to Viewer and even
inserted a volatile formula with RANDBETWEEN in M11 and there is definitely
no screen updating until after the code is finished.

I tested with Application.ScreenUpdating = False inserted both before and
after the worksheet selection line.

Can you see if Range("M13:M204") is actually updated while the Point 2
msgbox is still displayed?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200908/1

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default Why does Selection.PasteSpecial toggle Application.ScreenUpdat

For interest I Googled 'application.screenupdating not working' and got
113,000 hits so you are obviously not on your own. Of the few that I looked
at, the only one that had any kind of solution was where the OP said he/she
deleted the line of code
(Application.ScreenUpdating = False) and re-inserted it and it worked
properly.

However, you might be better to adopt a more professional approach to your
code and avoid selecting worksheets or ranges. The only time your code should
select a worksheet or range is at the end of the code to leave the workbook
in a particular state displaying worksheet and range that the user is to
continue with.

I like to test my code by adding a dummy worksheet and selecting it before
running the code. I think I have it correct when the entire code runs without
ever moving off the dummy worksheet.

Try the following code in lieu of your posted code. Note that a space and
underscore at the end of a line is a line break in anotherwise single line of
code.

With Worksheets("Viewer")
.Range("M11").Copy
.Range("M13:M204").PasteSpecial _
Paste:=xlPasteFormulas, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With

--
Regards,

OssieMac


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
How to set Application.ScreenUpdating = False for Gen use David_Williams_PG () Excel Discussion (Misc queries) 1 August 15th 06 12:06 PM
Screenupdating Problems Trent Excel Discussion (Misc queries) 0 April 28th 06 07:03 AM
Application.ScreenUpdating function question Fleone Excel Worksheet Functions 2 May 12th 05 01:36 AM
Wide Selection of Absolute Reference Toggle Sharon Excel Discussion (Misc queries) 4 April 19th 05 04:45 AM


All times are GMT +1. The time now is 05:06 PM.

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

About Us

"It's about Microsoft Excel"