pastespecial in excel

A

adrian

hello!

i have a problem in pasting the content of a cell into another. i have
tried it with the following code:

excel = createobject ("excel.application")
with excel
.range ("B7").pastespecial (.xlpastetype.xlpastevalues)
end with

and with the code from the example on the microsoft msdn homepage:

excel=createobject ("excel.application")
with excel
.range ("b7").pastespecial paste:=xlpastevalues
end with

excel is defined as excel.application

thanks in advance

adrian
 
G

Greg Burns

Here is some old code I have that does a paste:

xlSheet.Range("G3") = 0
xlSheet.Range("G3").Select
Selection.Copy
xlSheet.Range("G3", Cells(3, 8 + giRange - 2)).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
False, Transpose:=False

Your code doesn't appear to be using a Sheet object. Not sure that would
work...

HTH,
Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top