+ Reply to Thread
Results 1 to 2 of 2

Small Loop Problem

Hybrid View

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    lapeer michigan
    MS-Off Ver
    Excel 2013
    Posts
    7

    Small Loop Problem

    Loop Buttons

    Hi Guys

    Thank you in advance ......Could some out there please help me . I am fairly new to excel ........ I am trying to do a loop on all shapes on a active worksheet i got this really cool code that does just that . The problem is "it selects the command Buttons as shapes " as well. Could someone help me on how to Get only the shapes and not the Ole Objects . Thank you So Much Eric Maxfield

    Sub GetShapeProperties()

    Dim sShapes As Shape, lLoop As Long
    Dim ws1 As Worksheet



    Set ws1 = Worksheets("sheet1")


    'Add headings for our lists. Expand as needed

    ws1.Range("A1:C1") = _
    Array("Shape Name ", "Height", "Width")

    'Loop through all shapes on active sheet

    For Each sShapes In ws1.Shapes

    'Increment Variable lLoop for row numbers

    lLoop = lLoop + 1

    With sShapes

    'Add shape properties

    ws1.Cells(lLoop + 1, 1) = .Name
    ws1.Cells(lLoop + 1, 2) = .Height
    ws1.Cells(lLoop + 1, 3) = .Width

    'Follow the same pattern for more

    End With




    The report works well What i would like to achieve is Getting rid of the buttons in the loop



    My report shows
    button 1
    button 2
    command buttons you know

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Small Loop Problem Anyyybody out there lol ? :) TY

    Welcome to the forum.

    Pls take a look to forum rules and specially in rules#1 &3 !
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Small problem with #Value!
    By Skaapie in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-29-2010, 05:49 PM
  2. Small Problem
    By dynateck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2007, 12:37 PM
  3. small problem
    By PH NEWS in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-22-2006, 03:20 PM
  4. A small problem for you but big for me!
    By Michael in forum Excel General
    Replies: 4
    Last Post: 06-28-2005, 02:05 AM
  5. [SOLVED] Problem with small()....I think
    By Weekend user in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2005, 07:06 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