kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
if I have some photos stored with command button page
Is there any way that I can delete the photos only but not command button together by F5/goto/object

if no, any macro that can do it?
I had around 200photos in column F

thanks for the help
 
Last edited:

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,770
Office Version
  1. 2010
Platform
  1. Windows
Not that I know of.

Via VBA,

Code:
Worksheets("command button page").Pictures.Delete
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,503
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
You can use the Selection pane (Home Tab, under Find and Select). After using the f5 special to select them all, you can then Ctrl+Click the button in the selection pane to deselect it.
 

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248

ADVERTISEMENT

You can use the Selection pane (Home Tab, under Find and Select). After using the f5 special to select them all, you can then Ctrl+Click the button in the selection pane to deselect it.

any possible i can use macro too?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,503
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Yes, if you want. Shg's code will not delete the commandbutton.
 

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248

ADVERTISEMENT

Yes, if you want. Shg's code will not delete the commandbutton.

:eek:
i made a quick test on new sheet_command button page, but not working well(button will be deleted also), am i go for something wrong?
simply add 2 photos/create button/double click the button and add code/exit the vba dialogue/click that button again/ all gone. :confused:
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,503
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
That is curious. Can you use a Form button instead? It won't have that problem (and is more stable anyway).
 

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
That is curious. Can you use a Form button instead? It won't have that problem (and is more stable anyway).

sorry that, how to create "Form button"?
i have command button(activex control) in my quick access toolbar
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,503
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Change your options to show the Developer tab in the ribbon, then you can use the Insert dropdown on that tab.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,960
Messages
5,525,913
Members
409,671
Latest member
nasseralateek

This Week's Hot Topics

Top