+ Reply to Thread
Results 1 to 6 of 6

Macro Is Deleting all Pictures and ActiveX Objects

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Macro Is Deleting all Pictures and ActiveX Objects

    I have peiced together the following macro to insert a signature on the timesheet. It is working but not without issue.
    Please Login or Register  to view this content.
    The code functions perfect......as long as my ActiveX Toggle Button (ToggleButton1) is not there. It sees it as a shape and wants to delete it. How can this code be written as to either skip ToggleButton1 or only delete actual pictures? I have the sheet attached to aid in helping with a solution. Many thanks!

    Timesheet Editing test.xlsm

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: Macro Is Deleting all Pictures and ActiveX Objects

    Objects on the sheet are considered pictures. (ActiveSheet.Pictures) including TOGGLE BUTTONS.
    You may have to get the name of the toggle and prevent it from deleting.

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Macro Is Deleting all Pictures and ActiveX Objects

    That's what I was afraid of. There is only one toggle button and it is always "ToggleButton1". How would I edit the string to omit "ToggleButton1"?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro Is Deleting all Pictures and ActiveX Objects

    Hi nwb

    Play with something like this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Registered User
    Join Date
    03-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Macro Is Deleting all Pictures and ActiveX Objects

    I am at a loss here.....

  6. #6
    Registered User
    Join Date
    03-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Macro Is Deleting all Pictures and ActiveX Objects

    I figured it out...Crudely but, it works... Thanks guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Deleting all pictures on sheet but not macro buttons
    By simonsmith in forum Excel General
    Replies: 4
    Last Post: 05-04-2013, 11:22 AM
  2. Can I protect activex-objects?
    By Crüe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2011, 01:09 AM
  3. Deleting objects using Macro
    By dreicer_Jarr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-15-2008, 02:55 PM
  4. Replies: 1
    Last Post: 01-29-2006, 02:50 AM
  5. [SOLVED] Worksheet ActiveX Objects
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2005, 01:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1