+ Reply to Thread
Results 1 to 7 of 7

Uncheck Checkbox on ThisWorkbook > On All Sheets

  1. #1
    Forum Contributor
    Join Date
    08-28-2012
    Location
    Klang, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    113

    Uncheck Checkbox on ThisWorkbook > On All Sheets

    Hi All!
    Having a lil problem on my code. For the current code i used now, it worked only on Sheet1 but not sheet2,3,4.....

    Please Login or Register  to view this content.
    What should i change in order for excel to uncheck all of the checkbox on every sheets with checkbox in?

    BRgds
    C.Y.Chua

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    Try:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-28-2012
    Location
    Klang, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    Hi Mumps1
    Thanks for your reply. I had try the code below your show me.
    It shown error msg : Next Without For.

    It might be other code is wrong or something. Below is my code in 1 module. Sorry to tell you that i am noob for VB.

    Please Login or Register  to view this content.
    Other than this uncheck thingy. I face another problem, when i copy the command button from Sheet1 to Sheet2, i thought it would work but it dont....

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    My apologies. I got a couple of lines reversed. Try this:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-28-2012
    Location
    Klang, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    It works brilliantly now.

    Sorry to ask for additional stuff, Mumps1.

    On Sheet1 my command button work well. When i copy and paste the command button from sheet1 to sheet2. It showed error msg "cannot change part of a merged cell".

    As i seen the command button, is based on the sheet2 for the function code of clearing contents. intead of sheet1 which as below,
    Please Login or Register  to view this content.
    How should i correct this?

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    It looks like you are trying to clear the contents of cells which are merged. Merged cells most often cause problems in Excel and you should try to avoid them if you can. Try changing the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-28-2012
    Location
    Klang, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Uncheck Checkbox on ThisWorkbook > On All Sheets

    Actually i doing it correctly as i feel. Just that the clearing contents code is Sheet1, but when i click the command button on sheet2, it referred to sheet2 cell which is merged.
    Last edited by cychua; 01-24-2013 at 05:34 AM. Reason: Do have my company logo on file

+ 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