brightsites
New Member
- Joined
- Sep 19, 2012
- Messages
- 6
Hi Guys,
This is my very first post on this fine forum and was hoping someone may be able to shed some light on this error.
I've built a system for creating reports, its built in excel 2010 and works perfectly on 2010 and 2007 (on about 10 different machines). The problem is a single machine.. Part of the code runs through all the tabs in the report and converts all objects (graphs etc) into JPEG's and then exports the report into a new workbook ready for sending.
The section of code causing and error is as follows: (Runtime 1004 error caused at ".Paste")
Another strange part of this is that if you step through the code with the debugger, no errors are caused and also if you simply hit debug and resume the code runs as it should (without error)
I feel like I have tried everything, we have several machines using the same version of excel 2010 without error.
Would REALLLY appreciate any help you can provide.
Many thanks
BrightSites
This is my very first post on this fine forum and was hoping someone may be able to shed some light on this error.
I've built a system for creating reports, its built in excel 2010 and works perfectly on 2010 and 2007 (on about 10 different machines). The problem is a single machine.. Part of the code runs through all the tabs in the report and converts all objects (graphs etc) into JPEG's and then exports the report into a new workbook ready for sending.
The section of code causing and error is as follows: (Runtime 1004 error caused at ".Paste")
Code:
With Worksheets("Organic Traffic")
For Each chtO In .ChartObjects
chtO.CopyPicture
.Paste
With .Shapes(.Shapes.Count)
.Top = chtO.Top
.Left = chtO.Left
.Name = chtO.Name & "_pic"
' 'Application.Wait Now + TimeValue("00:00:01")
End With
chtO.Delete
Next chtO
End With
Another strange part of this is that if you step through the code with the debugger, no errors are caused and also if you simply hit debug and resume the code runs as it should (without error)
I feel like I have tried everything, we have several machines using the same version of excel 2010 without error.
Would REALLLY appreciate any help you can provide.
Many thanks
BrightSites