+ Reply to Thread
Results 1 to 8 of 8

Reset Button Works Once

  1. #1
    Registered User
    Join Date
    08-23-2017
    Location
    Michigan
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    4

    Reset Button Works Once

    I am trying to create a checklist for several areas, using one worksheet tab per area. I inserted a reset button to clear all filled in info as well as clear the check boxes. This works once for each worksheet, but will not work again.
    Here is the current code I am using:

    Private Sub CommandButton1_Click()
    Sheet1.Range("E5:E12").Value = False
    Sheet1.Range("E15:E18").Value = False
    Sheet1.Range("F5:G5").Value = ""
    Sheet1.Range("J9:K9").Value = ""
    Sheet1.Range("G9:G10").Value = ""
    Sheet1.Range("G16").Value = ""
    End Sub

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: Reset Button Works Once

    I can't see why it wouldn't work. You'll have to upload a sample worksheet.
    Design everything to be as simple as possible, but no simpler.

  3. #3
    Registered User
    Join Date
    08-23-2017
    Location
    Michigan
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    4

    Re: Reset Button Works Once

    See Attached:Shift Handoff Checklist.xlsm

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: Reset Button Works Once

    It works for me. I did the following on sheet "CTR 1":

    1. Made sure calculation setting was set to Automatic
    2. Pressed the button to clear the data already in the sheet
    3. Refilled in data to the checkboxes and the input cells
    4. Pressed the button again, the data clears, and the sheet resets
    5. Repeating this process yields the same results

    Same results for the other sheets.


    What happens specifically when you press the button the second time (and it doesn't reset)?

  5. #5
    Registered User
    Join Date
    08-23-2017
    Location
    Michigan
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    4

    Re: Reset Button Works Once

    When doing it on only one sheet it seems to work fine, however the intention is to have all 4 CTR sheets up at once in a tiled display. When I run the reset on all 4 sheets, it clears them each individually, however only one of the buttons will continue to work afterwards (CTR 4 Sheet).

    Quote Originally Posted by Stormin' View Post
    It works for me. I did the following on sheet "CTR 1":

    1. Made sure calculation setting was set to Automatic
    2. Pressed the button to clear the data already in the sheet
    3. Refilled in data to the checkboxes and the input cells
    4. Pressed the button again, the data clears, and the sheet resets
    5. Repeating this process yields the same results

    Same results for the other sheets.


    What happens specifically when you press the button the second time (and it doesn't reset)?

  6. #6
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: Reset Button Works Once

    Ok, I've managed to replicate your problem in Excel 2010 by doing the following:

    1. Open your sheet
    2. Create three new windows through View > New Window
    3. Tile the windows through View > Arrange All > Tiled
    4. Change each window to a different CTR sheet
    5. Only the ActiveX button in the parent (1) window works


    To be honest when I first saw your sheet I did wonder why you used the more complicated ActiveX buttons instead of simple Form Control buttons.

    I added normal buttons to your sheets with the following method:

    1. Developer > Insert > (Section: Form Controls) Button
    2. Draw the button
    3. Click Cancel on the "Assign Macro" window
    4. Open VBA Editor with ALT + F11
    5. Created a new module called "Buttons"
    6. Added a sub called "Button1_Click" and filled in the appropriate code
    7. Right click on the button in the sheet, click "Assign Macro", and choose "Button1_Click"
    8. Repeated steps 1-4 and 6-7 for the remaining buttons ("Button2_Click" etc.)

    Repeating the test showed that the form control buttons work in split windows where the ActiveX buttons do not. I don't know why this happens as I rarely, if ever, use ActiveX controls. I find it's best to use Form Controls as they are a lot simpler to setup, use, and manage. In cases that you need to use ActiveX controls... you'll know beforehand.

    See attached spreadsheet for a working example

    Hope this helps!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-23-2017
    Location
    Michigan
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    4

    Re: Reset Button Works Once

    Stormin',

    Thanks a bunch! The only reason I was using ActiveX buttons was because the video I was referencing used it. This was all from youtube and google learning.

    Thanks again!

  8. #8
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: Reset Button Works Once

    No worries, we never stop learning
    If that takes care of your original question, please select Thread Tools from the menu link above to mark this thread as SOLVED.
    To say thanks to the user(s) who contributed towards the solution, you can use the "Add Reputation" button on their helpful post(s).
    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. Create running stopwatch/timer with 1 button (start/stop). No reset button.
    By leeroy2612 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2021, 12:59 AM
  2. [SOLVED] I need to create a reset button that will reset rows containing a specific value
    By odin78 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-03-2016, 02:11 PM
  3. VBA as a reset button
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2013, 12:39 AM
  4. [SOLVED] Data Validation reset only works one row at a time
    By Stphne38 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-12-2013, 09:35 AM
  5. Reset Button
    By alvstar2001 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 06:03 AM
  6. Reset Button??
    By elfiky in forum Excel General
    Replies: 2
    Last Post: 03-19-2009, 09:05 PM
  7. Reset Button
    By trilogy in forum Excel General
    Replies: 0
    Last Post: 07-26-2006, 10:36 PM

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