View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
J_Knowles J_Knowles is offline
external usenet poster
 
Posts: 28
Default I'm Paste values stupid

Sub Macro1()
'source workbook
Workbooks("delete_blank_rowsColB.xlsm").Worksheets ("Sheet1").Activate
ActiveSheet.Range("A3").Copy
'destination workbook
Windows("Book3").Activate 'unsaved workbook
ActiveSheet.Range("A3").PasteSpecial Paste:=xlPasteValues
ActiveSheet.Range("A3").PasteSpecial Paste:=xlPasteFormats

End Sub

HTH,
--
Data Hog


"xp" wrote:

I'm trying to do something very simple. I go to a sheet and select a range
and click copy to copy a range. I switch to another workbook and click a
button. The code attached to the button should paste values into the active
sheet starting at cell "A3".

It's ridiculous because this should be easy; I even recorded a macro to do
this and the recording fails. Microsoft hasn't improved this yet?????

Here is some of the code I've tried:

ActiveSheet.Range("A3").PasteSpecial Paste:=xlPasteValues
Cells.PasteSpecial Paste:=xlPasteValues
ActiveSheet.Range("A3").PasteSpecial xlPasteValues
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False

Any help appreciated...