Lifeseeker
Registered User.
- Local time
- Yesterday, 20:24
- Joined
- Mar 18, 2011
- Messages
- 273
Hi there,
I'm trying to paste the values of worksheet 1 by value. Please see the attached two files.
When I run the code, it indicates that variable ( xlpastevalues) is not defined.
It is not a variable....
can someone help?
Can someone help?
Thanks
I'm trying to paste the values of worksheet 1 by value. Please see the attached two files.
When I run the code, it indicates that variable ( xlpastevalues) is not defined.
It is not a variable....
can someone help?
Code:
Private Sub Command0_Click()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "Your location\metric_DEV.xls", True, False
With xlApp.activeworkbook.worksheets("Metric summary")
.usedrange.copy
.range("A1").pasteSpecial paste:=xlPasteValues
End With
End Sub
Can someone help?
Thanks