tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
When I use this code, everything works as expected:
However, after running the following code:
if I try to close the workbook, this error message appears twice in succession:
I have googled it and it appears to be a problem with the clipboard:
What's the difference between the two pieces of code?
Thanks
Code:
Workbooks.Add
Dim wb As Workbook
Set wb = ActiveWorkbook
wksData.Cells.Copy
wb.Sheets(1).Paste
Set wb = Nothing
However, after running the following code:
Code:
Workbooks.Add
Dim wb As Workbook
Set wb = ActiveWorkbook
wksData.Cells.Copy Destination:=wb.Sheets(1).Cells(1, 1)
Set wb = Nothing
if I try to close the workbook, this error message appears twice in succession:
Code:
The picture is too large and will be truncated.
I have googled it and it appears to be a problem with the clipboard:
Code:
"This is quite a common issue that is not directly attributed to Excel – rather it’s caused by a running 3rd party application that’s interacting with the Windows clipboard."
What's the difference between the two pieces of code?
Thanks