LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Noel Rietman
 
Posts: n/a
Default delete pictures with a macro

This is probably very basic but it has totally eluded a novice. In Excel
2003 I am copying a chart from workbook "wx" as a picture into workbook "yz"
using macro "a". I then later try to delete the picture with macro "b" in
order to save an updated version of the chart. Macro "b" seems to be unable
to find the picture to delete it.

The code I am using is the result of recording a macro. It works when I
record it but never after that. The code is:

macro "a"
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:= _
xlPicture
ActiveWindow.Visible = False
Windows("wx.xls").Activate
Range("G29").Select
Windows("yz.xls").Activate
Range("A1").Select
ActiveSheet.Pictures.Paste.Select

macro "b"
Windows("yz.xls").Activate
ActiveSheet.Shapes("Picture 3").Select
Selection.Delete

Thanks very much for your help.

Noel
 
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
Macro to delete rows with same data Connie Martin Excel Worksheet Functions 12 November 22nd 05 01:18 PM
macro to copy and edit then delete a worksheet lschuh Excel Discussion (Misc queries) 13 July 27th 05 09:02 PM
Error when trying to delete a macro... Currie Excel Discussion (Misc queries) 5 July 6th 05 07:31 PM
Can't find macro in an Excel file to delete it Ron Excel Discussion (Misc queries) 3 July 1st 05 01:07 PM
Macro data selection line delete Frantic Excel-er Excel Discussion (Misc queries) 0 May 31st 05 11:46 PM


All times are GMT +1. The time now is 03:36 PM.

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

About Us

"It's about Microsoft Excel"