How can I select all the picture objects in my excel file and delete them?
I've tried highlighting the column but that doesn't work.
Thanks Mike
How can I select all the picture objects in my excel file and delete them?
I've tried highlighting the column but that doesn't work.
Thanks Mike
Hi Mike
All objects or only Pictures ?
See this page for example code
http://www.rondebruin.nl/controlsobjectsworksheet.htm
--
Regards Ron de Bruin
http://www.rondebruin.nl
"The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
> How can I select all the picture objects in my excel file and delete them? I've tried highlighting the column but that doesn't
> work.
>
> Thanks Mike
>
Only pictures.
Thanks
"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
> Hi Mike
>
> All objects or only Pictures ?
>
> See this page for example code
> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
> news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>> How can I select all the picture objects in my excel file and delete
>> them? I've tried highlighting the column but that doesn't work.
>>
>> Thanks Mike
>>
>
>
Try this one
Sub Shapes2()
'Loop through the Shapes collection and use the Type number of the control
Dim myshape As Shape
For Each myshape In ActiveSheet.Shapes
' pictures
If myshape.Type = 13 Then myshape.Delete
' You can also use myshape.Visible = False
Next myshape
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
> Only pictures.
> Thanks
>
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>> Hi Mike
>>
>> All objects or only Pictures ?
>>
>> See this page for example code
>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>> How can I select all the picture objects in my excel file and delete them? I've tried highlighting the column but that doesn't
>>> work.
>>>
>>> Thanks Mike
>>>
>>
>>
>
>
It worked on a picture I've inserted into the execl spreadsheet but not on
what I pasted into the spreadsheet. I'm pasting from the internet and it
puts the little Java Icon on the spreadsheet. I click on the Icon and it
says it's a picture. Maybe it's a different type?
"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
> Try this one
>
> Sub Shapes2()
> 'Loop through the Shapes collection and use the Type number of the control
> Dim myshape As Shape
> For Each myshape In ActiveSheet.Shapes
>
> ' pictures
> If myshape.Type = 13 Then myshape.Delete
> ' You can also use myshape.Visible = False
>
> Next myshape
> End Sub
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
> news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>> Only pictures.
>> Thanks
>>
>>
>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>> news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>> Hi Mike
>>>
>>> All objects or only Pictures ?
>>>
>>> See this page for example code
>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>
>>>
>>> --
>>> Regards Ron de Bruin
>>> http://www.rondebruin.nl
>>>
>>>
>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
>>> news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>> How can I select all the picture objects in my excel file and delete
>>>> them? I've tried highlighting the column but that doesn't work.
>>>>
>>>> Thanks Mike
>>>>
>>>
>>>
>>
>>
>
>
Do you have other controls on that sheet Mike that you want to keep ?
Forms controls or controltoolbox controls ?
--
Regards Ron de Bruin
http://www.rondebruin.nl
"The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
> It worked on a picture I've inserted into the execl spreadsheet but not on what I pasted into the spreadsheet. I'm pasting from
> the internet and it puts the little Java Icon on the spreadsheet. I click on the Icon and it says it's a picture. Maybe it's a
> different type?
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>> Try this one
>>
>> Sub Shapes2()
>> 'Loop through the Shapes collection and use the Type number of the control
>> Dim myshape As Shape
>> For Each myshape In ActiveSheet.Shapes
>>
>> ' pictures
>> If myshape.Type = 13 Then myshape.Delete
>> ' You can also use myshape.Visible = False
>>
>> Next myshape
>> End Sub
>>
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>> Only pictures.
>>> Thanks
>>>
>>>
>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>> Hi Mike
>>>>
>>>> All objects or only Pictures ?
>>>>
>>>> See this page for example code
>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>
>>>>
>>>> --
>>>> Regards Ron de Bruin
>>>> http://www.rondebruin.nl
>>>>
>>>>
>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>> How can I select all the picture objects in my excel file and delete them? I've tried highlighting the column but that doesn't
>>>>> work.
>>>>>
>>>>> Thanks Mike
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
No.
"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:OMdeQHaLGHA.3732@TK2MSFTNGP10.phx.gbl...
> Do you have other controls on that sheet Mike that you want to keep ?
> Forms controls or controltoolbox controls ?
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
> news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
>> It worked on a picture I've inserted into the execl spreadsheet but not
>> on what I pasted into the spreadsheet. I'm pasting from the internet and
>> it puts the little Java Icon on the spreadsheet. I click on the Icon and
>> it says it's a picture. Maybe it's a different type?
>>
>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>> news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>>> Try this one
>>>
>>> Sub Shapes2()
>>> 'Loop through the Shapes collection and use the Type number of the
>>> control
>>> Dim myshape As Shape
>>> For Each myshape In ActiveSheet.Shapes
>>>
>>> ' pictures
>>> If myshape.Type = 13 Then myshape.Delete
>>> ' You can also use myshape.Visible = False
>>>
>>> Next myshape
>>> End Sub
>>>
>>>
>>> --
>>> Regards Ron de Bruin
>>> http://www.rondebruin.nl
>>>
>>>
>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
>>> news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>>> Only pictures.
>>>> Thanks
>>>>
>>>>
>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>>>> news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>>> Hi Mike
>>>>>
>>>>> All objects or only Pictures ?
>>>>>
>>>>> See this page for example code
>>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>>
>>>>>
>>>>> --
>>>>> Regards Ron de Bruin
>>>>> http://www.rondebruin.nl
>>>>>
>>>>>
>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in
>>>>> message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>>> How can I select all the picture objects in my excel file and delete
>>>>>> them? I've tried highlighting the column but that doesn't work.
>>>>>>
>>>>>> Thanks Mike
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Then use this Mike
Sub Shapes1()
'Delete all Objects except Comments
On Error Resume Next
ActiveSheet.DrawingObjects.Visible = True
ActiveSheet.DrawingObjects.Delete
On Error GoTo 0
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23RM5YJaLGHA.3896@TK2MSFTNGP15.phx.gbl...
> No.
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:OMdeQHaLGHA.3732@TK2MSFTNGP10.phx.gbl...
>> Do you have other controls on that sheet Mike that you want to keep ?
>> Forms controls or controltoolbox controls ?
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
>>> It worked on a picture I've inserted into the execl spreadsheet but not on what I pasted into the spreadsheet. I'm pasting from
>>> the internet and it puts the little Java Icon on the spreadsheet. I click on the Icon and it says it's a picture. Maybe it's a
>>> different type?
>>>
>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>>>> Try this one
>>>>
>>>> Sub Shapes2()
>>>> 'Loop through the Shapes collection and use the Type number of the control
>>>> Dim myshape As Shape
>>>> For Each myshape In ActiveSheet.Shapes
>>>>
>>>> ' pictures
>>>> If myshape.Type = 13 Then myshape.Delete
>>>> ' You can also use myshape.Visible = False
>>>>
>>>> Next myshape
>>>> End Sub
>>>>
>>>>
>>>> --
>>>> Regards Ron de Bruin
>>>> http://www.rondebruin.nl
>>>>
>>>>
>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>>>> Only pictures.
>>>>> Thanks
>>>>>
>>>>>
>>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>>>> Hi Mike
>>>>>>
>>>>>> All objects or only Pictures ?
>>>>>>
>>>>>> See this page for example code
>>>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards Ron de Bruin
>>>>>> http://www.rondebruin.nl
>>>>>>
>>>>>>
>>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>>>> How can I select all the picture objects in my excel file and delete them? I've tried highlighting the column but that
>>>>>>> doesn't work.
>>>>>>>
>>>>>>> Thanks Mike
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
That works better.
Thanks again.
"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:e1rxdKaLGHA.3492@TK2MSFTNGP09.phx.gbl...
> Then use this Mike
>
> Sub Shapes1()
> 'Delete all Objects except Comments
> On Error Resume Next
> ActiveSheet.DrawingObjects.Visible = True
> ActiveSheet.DrawingObjects.Delete
> On Error GoTo 0
> End Sub
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
> news:%23RM5YJaLGHA.3896@TK2MSFTNGP15.phx.gbl...
>> No.
>>
>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>> news:OMdeQHaLGHA.3732@TK2MSFTNGP10.phx.gbl...
>>> Do you have other controls on that sheet Mike that you want to keep ?
>>> Forms controls or controltoolbox controls ?
>>>
>>> --
>>> Regards Ron de Bruin
>>> http://www.rondebruin.nl
>>>
>>>
>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
>>> news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
>>>> It worked on a picture I've inserted into the execl spreadsheet but not
>>>> on what I pasted into the spreadsheet. I'm pasting from the internet
>>>> and it puts the little Java Icon on the spreadsheet. I click on the
>>>> Icon and it says it's a picture. Maybe it's a different type?
>>>>
>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>>>> news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>>>>> Try this one
>>>>>
>>>>> Sub Shapes2()
>>>>> 'Loop through the Shapes collection and use the Type number of the
>>>>> control
>>>>> Dim myshape As Shape
>>>>> For Each myshape In ActiveSheet.Shapes
>>>>>
>>>>> ' pictures
>>>>> If myshape.Type = 13 Then myshape.Delete
>>>>> ' You can also use myshape.Visible = False
>>>>>
>>>>> Next myshape
>>>>> End Sub
>>>>>
>>>>>
>>>>> --
>>>>> Regards Ron de Bruin
>>>>> http://www.rondebruin.nl
>>>>>
>>>>>
>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in
>>>>> message news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>>>>> Only pictures.
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>>>>>> news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>>>>> Hi Mike
>>>>>>>
>>>>>>> All objects or only Pictures ?
>>>>>>>
>>>>>>> See this page for example code
>>>>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards Ron de Bruin
>>>>>>> http://www.rondebruin.nl
>>>>>>>
>>>>>>>
>>>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in
>>>>>>> message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>>>>> How can I select all the picture objects in my excel file and
>>>>>>>> delete them? I've tried highlighting the column but that doesn't
>>>>>>>> work.
>>>>>>>>
>>>>>>>> Thanks Mike
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
I took out the If statement and just left myshape.delete
Thanks so much for your help.
Mike
"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:OMdeQHaLGHA.3732@TK2MSFTNGP10.phx.gbl...
> Do you have other controls on that sheet Mike that you want to keep ?
> Forms controls or controltoolbox controls ?
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
> news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
>> It worked on a picture I've inserted into the execl spreadsheet but not
>> on what I pasted into the spreadsheet. I'm pasting from the internet and
>> it puts the little Java Icon on the spreadsheet. I click on the Icon and
>> it says it's a picture. Maybe it's a different type?
>>
>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>> news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>>> Try this one
>>>
>>> Sub Shapes2()
>>> 'Loop through the Shapes collection and use the Type number of the
>>> control
>>> Dim myshape As Shape
>>> For Each myshape In ActiveSheet.Shapes
>>>
>>> ' pictures
>>> If myshape.Type = 13 Then myshape.Delete
>>> ' You can also use myshape.Visible = False
>>>
>>> Next myshape
>>> End Sub
>>>
>>>
>>> --
>>> Regards Ron de Bruin
>>> http://www.rondebruin.nl
>>>
>>>
>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message
>>> news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>>> Only pictures.
>>>> Thanks
>>>>
>>>>
>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
>>>> news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>>> Hi Mike
>>>>>
>>>>> All objects or only Pictures ?
>>>>>
>>>>> See this page for example code
>>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>>
>>>>>
>>>>> --
>>>>> Regards Ron de Bruin
>>>>> http://www.rondebruin.nl
>>>>>
>>>>>
>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in
>>>>> message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>>> How can I select all the picture objects in my excel file and delete
>>>>>> them? I've tried highlighting the column but that doesn't work.
>>>>>>
>>>>>> Thanks Mike
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Don't do that Mike
Read about the bugs when you do that on the webpage
--
Regards Ron de Bruin
http://www.rondebruin.nl
"The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23uPUtLaLGHA.3984@TK2MSFTNGP14.phx.gbl...
>I took out the If statement and just left myshape.delete
>
> Thanks so much for your help.
>
> Mike
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:OMdeQHaLGHA.3732@TK2MSFTNGP10.phx.gbl...
>> Do you have other controls on that sheet Mike that you want to keep ?
>> Forms controls or controltoolbox controls ?
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:e6bdeFaLGHA.3064@TK2MSFTNGP10.phx.gbl...
>>> It worked on a picture I've inserted into the execl spreadsheet but not on what I pasted into the spreadsheet. I'm pasting from
>>> the internet and it puts the little Java Icon on the spreadsheet. I click on the Icon and it says it's a picture. Maybe it's a
>>> different type?
>>>
>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eBq%23D4ZLGHA.1532@TK2MSFTNGP12.phx.gbl...
>>>> Try this one
>>>>
>>>> Sub Shapes2()
>>>> 'Loop through the Shapes collection and use the Type number of the control
>>>> Dim myshape As Shape
>>>> For Each myshape In ActiveSheet.Shapes
>>>>
>>>> ' pictures
>>>> If myshape.Type = 13 Then myshape.Delete
>>>> ' You can also use myshape.Visible = False
>>>>
>>>> Next myshape
>>>> End Sub
>>>>
>>>>
>>>> --
>>>> Regards Ron de Bruin
>>>> http://www.rondebruin.nl
>>>>
>>>>
>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:eONp%23xZLGHA.984@tk2msftngp13.phx.gbl...
>>>>> Only pictures.
>>>>> Thanks
>>>>>
>>>>>
>>>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:eN5fmjZLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>>>>> Hi Mike
>>>>>>
>>>>>> All objects or only Pictures ?
>>>>>>
>>>>>> See this page for example code
>>>>>> http://www.rondebruin.nl/controlsobjectsworksheet.htm
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards Ron de Bruin
>>>>>> http://www.rondebruin.nl
>>>>>>
>>>>>>
>>>>>> "The Other Mike" <mdunlap(removeme)@bennettcompany.com> wrote in message news:%23%23bEQhZLGHA.2216@TK2MSFTNGP09.phx.gbl...
>>>>>>> How can I select all the picture objects in my excel file and delete them? I've tried highlighting the column but that
>>>>>>> doesn't work.
>>>>>>>
>>>>>>> Thanks Mike
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks