+ Reply to Thread
Results 1 to 5 of 5

UserForm and CheckBox

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    UserForm and CheckBox

    This is just a example of what I'm trying,I have a userform on my worksheet and two checkboxes. One of the checkbox has to be checked to run another function on the sheet,I can't get the commandbutton in the userform to see the checkboxes.I put a commandbutton on the sheet and it works perfect,not sure why userform does not work, Iposted a exampl workbook to see my problem. Here is my code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by zplugger; 12-05-2011 at 08:31 PM.

  2. #2
    Forum Contributor ianh's Avatar
    Join Date
    11-19-2010
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: UserForm and CheckBox

    do the check boxes have to be in the work book?
    If you place them in the useform the code will work fine.
    2+2=5 for extremely large values of 2.

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

    Re: UserForm and CheckBox

    You need to set an explicit reference to the controls.

    Please Login or Register  to view this content.
    Within the useform Checkbox1 and Checkbox would have been empty variant variables.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: UserForm and CheckBox

    you only need 1 checkbox if only 2 options are available to the user: true='finish', false='rough'



  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: UserForm and CheckBox

    Thanks Guys
    Putting Sheet1 in the code was the answer,you guy's are great.
    Z

+ 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