+ Reply to Thread
Results 1 to 6 of 6

Clear Contents Button

  1. #1
    Registered User
    Join Date
    07-15-2016
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    80

    Clear Contents Button

    Hi

    I created a simple userform, that after you hit submit, it enters the data into the sheet, then clears 2 out of the 4 textboxes.
    I have added a clear contents box, but unfortunately it won't work, because I have a code requiring that numbers needed to be added into the textboxes. How can I modify my code to allow me to click the CLEAR button and ignore that the textboxes need a numeric value (only for the clear button).

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Clear Contents Button

    Works for me...
    Why do you say it does not clear...
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    07-15-2016
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    80

    Re: Clear Contents Button

    Weird, I tried it myself after trying multiple times and it works :\
    Oh well, I guess I don't need help then, haha!

    Thank you anyways

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Clear Contents Button

    Yeah...I've also had...."Those Moments" lol...Happy coding...

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Clear Contents Button

    you have commented out two clear commands at the end of your code

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Clear Contents Button

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. [SOLVED] Clear contents button
    By jammy1066 in forum Excel General
    Replies: 7
    Last Post: 02-19-2018, 07:39 AM
  2. [SOLVED] Message box No button to clear cell contents
    By danbates in forum Excel General
    Replies: 3
    Last Post: 03-31-2017, 02:21 AM
  3. Clear Contents and Checkboxes Button
    By chparkervatech in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-23-2016, 11:47 AM
  4. Clear merged cell contents in comand button(clear all)
    By mohan_984 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-25-2015, 10:39 AM
  5. Clear Contents Macro-a Command Button
    By Andy Small in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2009, 05:29 AM
  6. creating clear contents button
    By ttik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2008, 08:57 PM
  7. Clear cell contents with a button
    By KFC / A&W Boy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-07-2005, 06:06 AM

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