Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1451
  • Last Modified:

Paste Special

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
drezner7
Asked:
drezner7
  • 3
  • 2
  • 2
1 Solution
 
Martin LissRetired ProgrammerCommented:
Record a macro while doing it and then edit the macro to see how it's done.
0
 
drezner7Author Commented:
i do not want a macro, my code in vbscript is pretty large and I need to add this piece to it...
0
 
drezner7Author Commented:
Is there anyone that can help?
0
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!

 
Martin LissRetired ProgrammerCommented:
   Range("D113:F113").Select
    Selection.Copy
    Range("T97").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
0
 
Bill PrewCommented:
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
 
drezner7Author Commented:
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
 
Bill PrewCommented:
Glad that helped, and thanks so much for the kind works, and grade.

~bp
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now