Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VBA Pastespecial

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

856 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