Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I get two copies of pictures in the loop instead of one - why?
Hi,
I have a sheet where I in Worksheet_Activate copy all chartobjects and paste them as pictures and then hide the chartobjects. This make the users not able to ruin the references in the charts. Problem: I get two copies of pictures...why???? She sheet1 had to have a couple of charts. Code: Sub CopyChart() Dim chtobj As ChartObject Dim W As Double Dim H As Double Dim T As Double Dim L As Double ActiveSheet.Unprotect ActiveSheet.Pictures.Delete For Each chtobj In Sheet1.ChartObjects W = chtobj.Width H = chtobj.Height L = chtobj.Left T = chtobj.Top chtobj.CopyPicture Appearance:=xlScreen, Format:=xlPicture ActiveSheet.Pictures.Paste.Select With Selection .Width = W .Height = H .Left = L .Top = T End With Next chtobj ActiveSheet.ChartObjects.Visible = False Exit Sub /Regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you export pictures from my pictures file into a word docu | New Users to Excel | |||
Number of copies to print keep defaulting to 12 copies why? | Excel Worksheet Functions | |||
Storing Clip Art pictures in My Pictures folder | Excel Discussion (Misc queries) | |||
Excel's Compress Pictures or deleting pictures doesn't seem work | Excel Discussion (Misc queries) | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |