+ Reply to Thread
Results 1 to 4 of 4

Resize buttons to cell

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Resize buttons to cell

    Hi All,

    I've got a couple of sheets with a lot of buttons in them. Some of these buttons have the wrong dimensions. What I want to do is run a macro so that every button gets the same dimensions as a given cell. I've found the following macro:

    Please Login or Register  to view this content.
    But this doesn't do anything (no error, but also no changes). If I step through the macro it jumps from line "For Each obj In ActiveSheet.OLEObjects" to line "Exit Sub". So it seems there are no OLEObjects in the sheet. But there are about 100 buttons in the sheet.

    Could a button be anything else than an OLEObject? And if so, is there a way I can change this macro to do what I want it to do?
    Last edited by romperstomper; 06-20-2011 at 09:46 AM. Reason: Mark solved

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Resize buttons to cell

    If you used Forms buttons, then they are Buttons rather than OLEObjects:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    01-27-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Resize buttons to cell

    That did the trick. Much appreciated!

  4. #4
    Registered User
    Join Date
    08-14-2011
    Location
    Lowestoft, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Resize buttons to cell

    @ romperstomper, Had been googling for about an hour b4 i came across you post!!

    Fixed my problem which was very close to OP's.

    trouble i had was Excel 2010 resizes form buttons after auto-filtering.

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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