Solved

Paste Special

Posted on 2011-09-19
7
1,359 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 45

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 45

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 51

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 51

Expert Comment

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

~bp
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

13 Experts available now in Live!

Get 1:1 Help Now