Solved

Paste Special

Posted on 2011-09-19
7
1,377 Views
Last Modified: 2012-05-12
I would like to know how to use paste special values in to Excel. I have played around with
oSheet2.Range("B3").PasteSpecial = Value, but It does not work.  

Can you help ?

thank you
0
Comment
Question by:drezner7
[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
  • 2
  • 2
7 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 36562623
Record a macro while doing it and then edit the macro to see how it's done.
0
 

Author Comment

by:drezner7
ID: 36562699
i do not want a macro, my code in vbscript is pretty large and I need to add this piece to it...
0
 

Author Comment

by:drezner7
ID: 36563356
Is there anyone that can help?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 47

Expert Comment

by:Martin Liss
ID: 36563718
   Range("D113:F113").Select
    Selection.Copy
    Range("T97").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
0
 
LVL 54

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 36564305
Since this is VBS, you will need to do something like:

oSheet1.Select
oSheet1.Range("A1").Copy
oSheet2.Range("B3").PasteSpecial -4163

Open in new window

Where -4163 indicates values only.

Name       Value       Description
xlPasteAll       -4104       Everything will be pasted.
xlPasteAllExceptBorders       7       Everything except borders will be pasted.
xlPasteAllUsingSourceTheme       13       Everything will be pasted using the source theme.
xlPasteColumnWidths       8       Copied column width is pasted.
xlPasteComments       -4144       Comments are pasted.
xlPasteFormats       -4122       Copied source format is pasted.
xlPasteFormulas       -4123       Formulas are pasted.
xlPasteFormulasAndNumberFormats       11       Formulas and Number formats are pasted.
xlPasteValidation       6       Validations are pasted.
xlPasteValues       -4163       Values are pasted.
xlPasteValuesAndNumberFormats       12       Values and Number formats are pasted.
0
 

Author Closing Comment

by:drezner7
ID: 36566650
BillPrew, you Rock...  You are awesome your help has allowed me to learn a lot more about VBS and how to use it correctly.  Thank you so much
0
 
LVL 54

Expert Comment

by:Bill Prew
ID: 36566678
Glad that helped, and thanks so much for the kind works, and grade.

~bp
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

732 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