I have a workbook i need to paste data to. What im trying to achieve:
- Workbook i want to paste data to is active
- Sheet in workbook i want to paste data to is not active
- User activates another workbook that is already open selecting the entire sheet and copies it to the clipboard.
- User goes back to the workbook data is going to be pasted to and runs a macro that pastes that data into another empty sheet with predefined sheet name.
- Paste must paste values only, no formatting, no comments, shapes, no merged cells. Only the values.
And i have tried alot of combinations .Paste Destination[...] and so on.
What im using today is:
Dim wb As Workbook
Dim wsPT As Worksheet
Dim wsQD As Worksheet
Set wb = ActiveWorkbook
Set wsPT = wb.Sheets("PasteTemplate")
Set wsQD = wb.Sheets("QuoteData")
wsPT.Cells.Clear
wsPT.Range("A1").PasteSpecial xlPasteValues