troubleshooting Question

Excel Active X controls acting up and not letting me check the checkbox

Avatar of oncall4you
oncall4youFlag for Canada asked on
Microsoft ExcelVisual Basic.NETMicrosoft Development
5 Comments1 Solution7617 ViewsLast Modified:
I am creating a form in Excel 2013 using activeX controls.  I use VBA code to resize the rowheight to shrink and grow the areas that have more detail.  So if you check the checkbox beside a category, it opens up and unhides the controls associated with it.  Basically more check boxes and labels, as well as a text box for the "other" field.

The checkboxes have unique names and captions.  When I check the checkbox it opens up the row to show the checkboxes, but only about half of them can be checked.  The ones that can't flash briefly further down the page, but won't check.  The text boxes won't take data either.

If I go into design mode and move the check box slightly, then get out of design mode they will work.  Until I shrink the row with the associated checkbox, then when I expand it, they stop working again.

The only thing I noticed is that the "top" property for the checkbox has a value that is duplicated on other checkboxes.  When I move it around in design mode, it changes, but after the problem recurs, it is back to it's original duplicate value.

Here is a sample of the vba code I use to change the row height:

Private Sub cbReports_Click()
 If cbReports = True Then
    Selection.rowheight = 100
    ActiveSheet.cbReportsphoto.Visible = True
    ActiveSheet.lblreportsphoto.Visible = True
    ActiveSheet.cbreportsfull.Visible = True
    ActiveSheet.lblReportsFull.Visible = True
    ActiveSheet.lblreportcopies.Visible = True
    ActiveSheet.lblReportscopyReq.Visible = True
    ActiveSheet.cbReportsCopyReq.Visible = True
    ActiveSheet.lblReportsCopyCust.Visible = True
    ActiveSheet.cbReportsCopyCust.Visible = True
    ActiveSheet.lblReportsCopyOther.Visible = True
    ActiveSheet.cbReportsCopyOther.Visible = True
    ActiveSheet.tbReportsCopyOther.Visible = True
    Selection.rowheight = 25
    ActiveSheet.cbReportsphoto.Visible = False
    ActiveSheet.lblreportsphoto.Visible = False
    ActiveSheet.cbreportsfull.Visible = False
    ActiveSheet.lblReportsFull.Visible = False
    ActiveSheet.lblreportcopies.Visible = False
    ActiveSheet.lblReportscopyReq.Visible = False
    ActiveSheet.cbReportsCopyReq.Visible = False
    ActiveSheet.lblReportsCopyCust.Visible = False
    ActiveSheet.cbReportsCopyCust.Visible = False
    ActiveSheet.lblReportsCopyOther.Visible = False
    ActiveSheet.cbReportsCopyOther.Visible = False
    ActiveSheet.tbReportsCopyOther.Visible = False
    End If
End Sub

You can see in the attached file screenshot, where the outside lab services checkbox has an errant check box below it. That ONLY appears when the mouse button is held down clicking on the Other checkbox above it that is clicked and it never unchecks.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros