+ Reply to Thread
Results 1 to 12 of 12

Hiding Check Boxes In VB excel 2007.

  1. #1
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6

    Hiding Check Boxes In VB excel 2007.

    Hello!!

    Im Having trouble with my Visual basic code in Excel 2007.
    I'm using the code to hide two rows which works fine, however my code to hide the check box (second line of code) doesn't work so if anyone can see where I'm going wrong that would be great

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Perhaps this will work
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6
    Thanks for trying to help but that code still doesn't work and needs to be debuged like my previous one :S

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Weird, DavesExcel's code does not give me an error but the checkbox becomes ghostlike (I can still see it but can no longer click on it and can now click on the cells behind it. What error are you getting when you run the code?

    Note: Control Toolbox Checkboxes do not have spaces (Checkbox1) and Forms Checkboxes do (Check box 1)
    Last edited by ChemistB; 12-10-2008 at 01:55 PM. Reason: Messed up :)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6
    Well It was givng me errors but i tried your previous suggestion of putting spaces between then Check box as it is a form control box and now it does work but at the wrong time. It now disappears when the other check box isn't checked and then hides the rows at the right time when check box 17, and I need both the rows and check box hidden at the same time??

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    This code will hide the rows and the checkbox when your first checkbox is checked and will unhide them when it is not checked.
    Please Login or Register  to view this content.
    Does that work for you?

  7. #7
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6
    No

    Please Login or Register  to view this content.
    The above needs to be debugged run-time error 424

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Hmmm, I don't have Excel 2007 so the problem might be there. Here is my workbook. Download and see if it gives you problems.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6
    The problem was I was using two form control option buttons it now works yays! thank you! Do you know a way to cell link control option buttons I've never used them before??

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    With the control Toolbox in the edit mode (the engineering triangle button depressed on the toolbar), right click on your checkbox and choose properties. One of the properties is "Linked Cell" Input the cell ID. Okay?

  11. #11
    Registered User
    Join Date
    12-09-2008
    Location
    Oxford
    Posts
    6
    Found properties and my workbook is all finished now with the hidden rows and checkbox working perfectly! Thank you sooo much you've been such a help yays so happy it's all finsihed hehe!!

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Ahh, nothing like a completed spreadsheet. Good to hear.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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