LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 15th 08, 04:26 PM posted to microsoft.public.excel.programming
external usenet poster
First recorded activity by ExcelBanter: Sep 2006
Posts: 5,600
Default Fix charts as embedded pictures

If the source of your five charts will remain on the undeleted sheets do you
really need to change them to pictures. If that's really the requirement
following should convert all embedded charts on worksheets 11 to .count.

Sub test()
Dim pic As Picture
Dim chtObj
Dim ws As Worksheet

For i = 11 To ActiveWorkbook.Worksheets.Count
Set ws = Worksheets(i)
For Each chtObj In ws.ChartObjects
With chtObj
' change arg's to suit
.Chart.CopyPicture Appearance:=xlScreen, _
Size:=xlScreen, _
Set pic = ws.Pictures.Paste
pic.Left = .Left
pic.Top = .Top
End With
ws.UsedRange.Value = ws.UsedRange.Value

ReDim arr(1 To 10)
For i = 1 To 4
arr(i) = i

Application.DisplayAlerts = False
Application.DisplayAlerts = True

End Sub

Really the term "embedded picture" means as an OLE, that's possible but not
what the above does.

Peter T

"iperlovsky" wrote in message
I am currently using the following macro to fix all values in the workbook
and then delete certain tabs. I recently added 5 charts to the tab I want

keep and was wondering if anyone knows how to fix the charts on that tab

embedded picture files in the worksheet. Any suggestions on how to modify

following routine, in particular the part that fixes all values to include
fixing the charts as embedded pictures, is appreciated.

Sub fixAll()
Application.DisplayAlerts = False
For i = 11 To Sheets.Count
With Sheets(i)
.UsedRange.Value = .UsedRange.Value
End With
Next i


Application.DisplayAlerts = True
End Sub

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix charts as embedded pictures Andy Pope Excel Programming 1 May 15th 08 08:01 PM
Embedded pictures kirkm[_7_] Excel Programming 2 August 23rd 07 09:39 AM
Embedded pictures in VBA JacMar Excel Discussion (Misc queries) 3 February 15th 07 05:12 AM
Are pictures in headers embedded or linked? Debbie Excel Discussion (Misc queries) 1 November 5th 06 12:06 AM
how do I delete thousands of pictures that are somehow embedded i. Jim Harris Excel Discussion (Misc queries) 4 February 25th 05 03:24 PM

All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 ExcelBanter.
The comments are property of their posters.

About Us

"It's about Microsoft Excel"


Copyright © 2017