Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA Pastespecial

Posted on 2012-03-15
3
Medium Priority
?
372 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
[X]
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
3 Comments
 
LVL 13

Assisted Solution

by:Shanan212
Shanan212 earned 1000 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 1000 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

610 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