Solved

VBA Pastespecial

Posted on 2012-03-15
3
336 Views
Last Modified: 2012-03-15
I need to paste the entire contents of one worksheet to another but only its formatting and values (no formulas).

I am using this so far:

wksDb.Cells.Copy wksOut.Cells

Open in new window

0
Comment
Question by:mcnuttlaw
3 Comments
 
LVL 13

Assisted Solution

by:Shanan212
Shanan212 earned 250 total points
ID: 37725514
assuming you paste on A1


wksDb.Cells.Copy
wksOut.range("A1").select
Selection.PasteSpecial xlPasteValuesAndNumberFormats

Open in new window

0
 
LVL 14

Accepted Solution

by:
Zack Barresse earned 250 total points
ID: 37725558
@Shanan212: You don't need to Select anything here.  Just access the range object...
wksDb.Cells.Copy
wksOut.range("A1").PasteSpecial xlPasteValuesAndNumberFormats

Open in new window


HTH
Regards,
Zack Barresse
0
 
LVL 2

Author Comment

by:mcnuttlaw
ID: 37725636
Thank you both.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now