Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
How do I change this to paste the values only? If I
put .PasteSpecial(xlPasteValues) at the end of each it says 'Unable to get the PasteSpecial property of the Range class'. SourceRange1.Copy DestRange1 SourceRange2.Copy DestRange2 Thank You, -- Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
Try this Dan
DestRange1.PasteSpecial xlPasteValues, , False, False -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Dan R." wrote in message ups.com... How do I change this to paste the values only? If I put .PasteSpecial(xlPasteValues) at the end of each it says 'Unable to get the PasteSpecial property of the Range class'. SourceRange1.Copy DestRange1 SourceRange2.Copy DestRange2 Thank You, -- Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
try this IF they are the SAME size.
DestRange1.value=sourceRange1.value -- Don Guillett SalesAid Software "Dan R." wrote in message ups.com... How do I change this to paste the values only? If I put .PasteSpecial(xlPasteValues) at the end of each it says 'Unable to get the PasteSpecial property of the Range class'. SourceRange1.Copy DestRange1 SourceRange2.Copy DestRange2 Thank You, -- Dan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
It doesnt like the syntax, am I doing something wrong?
Sub Update_Weekly_Report() Dim SourceRange1 As Range Dim SourceRange2 As Range Dim DestRange1 As Range Dim DestRange2 As Range Dim WB1 As Worksheet Dim WB2 As Workbook Application.ScreenUpdating = False Set WB1 = ActiveSheet Set WB2 = Workbooks.Open("A:\CP H6 Lookup.xls") Set SourceRange1 = WB1.Range("A2:B16") Set SourceRange2 = WB2.Sheets(13).Range("F3:F17") Set DestRange1 = WB2.Sheets(13).Range("B3") Set DestRange2 = WB1.Range("C2") SourceRange1.Copy DestRange1.PasteSpecial xlPasteValues, , False, False SourceRange2.Copy DestRange2.PasteSpecial xlPasteValues, , False, False DestRange2.EntireColumn.AutoFit WB2.Close savechanges:=False Application.ScreenUpdating = True End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
Use it like this
SourceRange1.Copy DestRange1.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False SourceRange2.Copy DestRange2.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Dan R." wrote in message oups.com... It doesnt like the syntax, am I doing something wrong? Sub Update_Weekly_Report() Dim SourceRange1 As Range Dim SourceRange2 As Range Dim DestRange1 As Range Dim DestRange2 As Range Dim WB1 As Worksheet Dim WB2 As Workbook Application.ScreenUpdating = False Set WB1 = ActiveSheet Set WB2 = Workbooks.Open("A:\CP H6 Lookup.xls") Set SourceRange1 = WB1.Range("A2:B16") Set SourceRange2 = WB2.Sheets(13).Range("F3:F17") Set DestRange1 = WB2.Sheets(13).Range("B3") Set DestRange2 = WB1.Range("C2") SourceRange1.Copy DestRange1.PasteSpecial xlPasteValues, , False, False SourceRange2.Copy DestRange2.PasteSpecial xlPasteValues, , False, False DestRange2.EntireColumn.AutoFit WB2.Close savechanges:=False Application.ScreenUpdating = True End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy/Paste Values Only
You're right... Thanks again Ron.
-- Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy / paste as values | New Users to Excel | |||
Copy and paste up to values in last row | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy/Paste Values | Excel Programming | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming |