+ Reply to Thread
Results 1 to 3 of 3

Center aligning checkboxes when generating via VBA

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    45

    Center aligning checkboxes when generating via VBA

    Hi guys,

    I am generating several checkboxes onto a workbook I have via VBA, but the issue I'm having is that the checkboxes are not aligning to the centre of the cells.

    I was hoping someone could point me in the right direction with this. I have included a simple version of the code I am using to generate the checkboxes, and any help with aligning them to the center automatically would be much appreciated!

    Thanks

    Please Login or Register  to view this content.
    Last edited by fullysic; 10-20-2011 at 09:17 PM.

  2. #2
    Registered User
    Join Date
    08-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Center aligning checkboxes when generating via VBA

    Hmm.. thought I had figured it out by offsetting the Left value, but it's not a perfect solution... if someone can still help me with code to center it perfectly in the middle of the cell (both horizontally and vertically) it would be much appreciated.
    Last edited by fullysic; 10-20-2011 at 09:17 PM.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Center aligning checkboxes when generating via VBA

    You made the checkbox the same size as the cell so centering would not give the appearence you are after.

    try this.
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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