Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #107968 > unrolled thread
| Started by | marc7474@excite.com |
|---|---|
| First post | 2015-08-14 14:51 -0700 |
| Last post | 2015-08-15 02:20 -0400 |
| Articles | 3 — 3 participants |
Back to article view | Back to microsoft.public.excel.programming
Delete Pictures in Excel 2010 marc7474@excite.com - 2015-08-14 14:51 -0700
Re: Delete Pictures in Excel 2010 Claus Busch <claus_busch@t-online.de> - 2015-08-15 08:09 +0200
Re: Delete Pictures in Excel 2010 isabelle <i@v.invalid> - 2015-08-15 02:20 -0400
| From | marc7474@excite.com |
|---|---|
| Date | 2015-08-14 14:51 -0700 |
| Subject | Delete Pictures in Excel 2010 |
| Message-ID | <721c3c8c-43ce-4ca3-8bc8-65289c14f633@googlegroups.com> |
Hi,
I have 2 macros that I use, below... that deletes all pictures form Active worksheet, it worked in excel 2000 but I am trying to use this in excel 2010 & it does not delete the pictures. Does this code need to be changed in order to work in excel 2010 and/or what should I add or change.
-----------------------------------
Sub Del_pics()
Application.ScreenUpdating = False
'delete pictures
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
shp.Delete
End If
Next shp
End Sub
-----------------------------------
Sub DeleteAllPics()
Dim Pic As Object
For Each Pic In ActiveSheet.Pictures
Pic.Delete
Next Pic
End Sub
-----------------------------------
Thanks for any help.
[toc] | [next] | [standalone]
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Date | 2015-08-15 08:09 +0200 |
| Message-ID | <mqmkv2$n2o$1@dont-email.me> |
| In reply to | #107968 |
Hi Marc,
Am Fri, 14 Aug 2015 14:51:05 -0700 (PDT) schrieb marc7474@excite.com:
> I have 2 macros that I use, below... that deletes all pictures form Active worksheet, it worked in excel 2000 but I am trying to use this in excel 2010 & it does not delete the pictures. Does this code need to be changed in order to work in excel 2010 and/or what should I add or change.
if I insert pictures they get the name "Graphic" and an index.
Try:
Sub Del_pics()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If Left(shp.Name, 7) = "Graphic" Then
shp.Delete
End If
Next
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2015-08-15 02:20 -0400 |
| Message-ID | <mqmlnp$i2d$1@speranza.aioe.org> |
| In reply to | #107968 |
hi Marc, Sub DeleteAllDrawingObjects() ActiveSheet.DrawingObjects.Delete End Sub isabelle Le 2015-08-14 17:51, marc7474@excite.com a écrit : > Hi, > > I have 2 macros that I use, below... that deletes all pictures form Active > worksheet, it worked in excel 2000 but I am trying to use this in excel 2010 > & it does not delete the pictures. Does this code need to be changed in order > to work in excel 2010 and/or what should I add or change. > > ----------------------------------- Sub Del_pics() Application.ScreenUpdating > = False 'delete pictures For Each shp In ActiveSheet.Shapes If shp.Type = > msoPicture Then shp.Delete End If Next shp End Sub > > ----------------------------------- Sub DeleteAllPics() Dim Pic As Object For > Each Pic In ActiveSheet.Pictures Pic.Delete Next Pic End Sub > ----------------------------------- > > Thanks for any help. >
[toc] | [prev] | [standalone]
Back to top | Article view | microsoft.public.excel.programming
csiph-web