Solved

VBA Pastespecial

Posted on 2012-03-15
3
331 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
excel file 5 53
EXCEL Addin problem 7 27
Input box prompt to specify column letter using VBA 4 16
MIN, using ARRAY 4 17
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

744 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

10 Experts available now in Live!

Get 1:1 Help Now