I have data copied to an excel workbook.
In the book I do some pasting of values. These are copied by formulas in another sheet.
To get rid of the calculations I want to copy and Past the values on the same sheet.
That's where things go wrong.
Set sht = excelApp.ActiveWorkbook.Sheets(1)
sht.Activate
sht.Cells.Select
With Selection
.Selection.Copy
.Selection.PasteSpecial Paste:=xlPasteValues
End With
It all goes well up to the sht.Cells.Select. I can see the sheet is selected. I can't copy or past the selection on the same sheet.
How should I do that??
In the book I do some pasting of values. These are copied by formulas in another sheet.
To get rid of the calculations I want to copy and Past the values on the same sheet.
That's where things go wrong.
Set sht = excelApp.ActiveWorkbook.Sheets(1)
sht.Activate
sht.Cells.Select
With Selection
.Selection.Copy
.Selection.PasteSpecial Paste:=xlPasteValues
End With
It all goes well up to the sht.Cells.Select. I can see the sheet is selected. I can't copy or past the selection on the same sheet.
How should I do that??