+ Reply to Thread
Results 1 to 7 of 7

how to process checkboxes in VBA

  1. #1
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    how to process checkboxes in VBA

    Hello,

    I am stuck on a basic problem of trying to work out how to handle checkboxes in VBA

    I have a worksheet ("Sheet1") with an activex checkbox (CheckBox1) in cell B1

    what code do I need to tell if the checkbox is ticked or not. (it probably should be some true / false type test but I keep not getting the syntax of the code correct.

    what do I need to declare or set or ????? to access the state of the checkbox please

    Help appreciated


    Jmac

  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: how to process checkboxes in VBA

    Hello jmac1947,

    ActiveX controls are part of the OLE Objects collection for a worksheet.
    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!)

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: how to process checkboxes in VBA

    Thanks Leith, assistance is appreciated.
    would the code alter if I had a "forms" checkbox instead of an ActiveX one?

    Jmac

    Cheers

    Jmac1947

    1. Please consider clicking on the * Add Reputation if you think this post has helped you
    2. Mark your thread as SOLVED when question is resolved

  4. #4
    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: how to process checkboxes in VBA

    Hello jmac1947,

    Yes, it would. The Forms controls are lighter weight controls created by Excel. ActiveX controls, also known as OLE (Object Linking and Embedding), conform to the Windows COM (Common Object Model) standard.

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: how to process checkboxes in VBA

    OK, thanks again Leith, help appreciated

  6. #6
    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: how to process checkboxes in VBA

    Hello jmac1947,

    Did you need want to see code the Forms check boxes also?

  7. #7
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: how to process checkboxes in VBA

    Hi Leith,

    if it isnt too much trouble, I will store it away in my "helpful snippets of code" repository

    Thanks

+ 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. Replies: 4
    Last Post: 04-28-2013, 12:47 AM
  2. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  3. Kill a second Excel process from the first excel process
    By sebair in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2012, 05:40 PM
  4. [SOLVED] How to count process running time ( process not finished)
    By miao jie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2005, 06:06 AM
  5. How to count process running time ( process not finished)
    By miao jie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2005, 02: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