copy range

  • Thread starter Thread starter Macgru
  • Start date Start date
M

Macgru

hi
is it possible to perform one after another:
copy range then clear another range and finally paste copied range to its
destination
something like

rng.copy
rng1.clearcontents
range("a1").PasteSpecial Paste:=xlPasteValues

doesnt work
it stops when paste as seems like clipboard is empty

thx
mcg
 
Without knowing what you're really doing, sometimes you can just change the
order and you'll be fine:

rng1.clearcontents
rng.copy
range("a1").pastespecial paste:=xlpastevalues
 
Uzytkownik "Dave Peterson said:
Without knowing what you're really doing, sometimes you can just change the
order and you'll be fine:

rng1.clearcontents
rng.copy
range("a1").pastespecial paste:=xlpastevalues

thanks
thats what i did to have it work
but range to be copied and to be deleted / pasted are placed in 2 worksheets
i just wanted to to built end/ with construction without switching between
sheets
it goes like that:

rng.copy
with sheets("mcg")
.rng1.clearcontents
.range("a1").PasteSpecial Paste:=xlPasteValues
end with

mcg
 
Somethings clear that clipboard.

Try it manually...
Select a range
copy it
select a nearby range and clear contents
You'll notice that the marching ants around the copied range is gone.

You can use two with/end with constructs if you really want.
 
Back
Top