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

x
?
Solved

Paste Special

Posted on 2011-09-19
7
Medium Priority
?
1,429 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 49

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 49

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 58

Accepted Solution

by:
Bill Prew earned 2000 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 58

Expert Comment

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

~bp
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

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