Copy & Paste

N

nc

1. Set sourceRange = mybook.Worksheets(1).Range("A1:L60")
2. Set destrange = basebook.Worksheets("Form temp").Range("A1")

3. sourceRange.Copy destrange

How can I change statement 3. above to copy and paste only values and number
format?
 
S

Stefi

SourceRange.Copy
destrange.Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False

Regards,
Stefi

„nc†ezt írta:
 
N

nc

Thanks Stefi.

Does this mean I cannot simplify the statement to

3. sourceRange.Copy destrange PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
 
S

Stefi

You can't! PasteSpecial works only from the clipboard!

Stefi


„nc†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top