View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
andy the pugh andy the pugh is offline
external usenet poster
 
Posts: 12
Default Visual Basic - Invisible Command

On May 28, 12:06*pm, Chris Stammers
wrote:
. The script works fine however you
can see it flicking between each sheet as it is copying and pasting. Is there
a piece of code that will hide this? I am using Excel 2003.


You can hide it with application.screenupdating as suggested above.
However, it sounds like your macros are perhaps based on recorded
macros? Recorded macros always select cells then work on them, which
is inelegant and potentially problematical. Much better to refer to
cells and ranges directly.

eg, instead of
Sheet1.range("A2:B3").select
selection.copy

use

sheet1.range("A2:B3").Copy