+ Reply to Thread
Results 1 to 2 of 2

Setting up Checkbox in VBA w/o Userforms

  1. #1
    Registered User
    Join Date
    09-04-2009
    Location
    Sutton Coldfield, UK
    MS-Off Ver
    Excel 2003
    Posts
    1

    Unhappy Setting up Checkbox in VBA w/o Userforms

    Have a Control Sheet that I use in every new Workbook. Trying to use VBA to setup a number of Control Toolbox Checkboxes (without using UserForms) dependent on the number of Tabs in the workbook. Have used Ritchie's BuildTOC code so have a TOC Table starting in Row 38. Test Workbook has 20 Tabs, so the TOC Col A shows each Tab Name.

    Code works fine, with 2 problems I can't fix:

    1) Row Height (A38-A57) has been fixed at 29 pixels. Expected the ActiveSheet line to align the Checkboxes with each of the 20 cells. The Properties of the resultant Checkbox vary in Height (29, 28.5 or 29.25) so do not align consistently.

    2) Then want to color each checkbox in the same color the Tabs are set (all different). Without the color code, I get the 20 correctly named checkboxes in White/Black. With the color code I get a mass of Black/Red which cannot be read.

    Please Login or Register  to view this content.
    Can anyone help resolve either problem please?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Setting up Checkbox in VBA w/o Userforms

    Hello dpbardell,

    This macro should do it. Give it try and let me know the results.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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