+ Reply to Thread
Results 1 to 3 of 3

Checking shape on worksheet

  1. #1
    Registered User
    Join Date
    07-22-2015
    Location
    Cambodia
    MS-Off Ver
    2013
    Posts
    7

    Checking shape on worksheet

    Hi All,


    I am trying to check the existence of shape on worksheet. It working fine when the shape found.
    However, if the shape not there it will return error instead of exit sub.

    Please Login or Register  to view this content.
    would appreciate if anyone could help me.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this function !

    PHP Code: 
    Function ExistShape(SOptional Ws As Worksheet) As Boolean
             
    If Ws Is Nothing Then Set Ws ActiveSheet
             On Error Resume Next
             ExistShape 
    IsObject(Ws.Shapes(S))
    End Function 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Checking shape on worksheet

    you may use NOT, try this
    Please Login or Register  to view this content.

+ 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] Hyperlinking a shape to a hidden worksheet
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2023, 01:50 AM
  2. How do you populate imagelist with shape from worksheet?
    By ppmendonca in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2014, 03:51 PM
  3. Control Tip for Shape in worksheet
    By surajitbose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2014, 10:14 AM
  4. Spell Checking Selected Shape Text Boxes
    By aistead in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2012, 12:09 PM
  5. Protect only one object (Shape) in a Worksheet
    By Wizz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-06-2010, 07:22 AM
  6. Add Shape in Protected Worksheet
    By ct11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2009, 10:15 AM
  7. Shape/picture name in a worksheet
    By neta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2006, 11:00 AM

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