+ Reply to Thread
Results 1 to 6 of 6

A vba code to clear Active X Control Text Boxes

  1. #1
    Forum Contributor
    Join Date
    05-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007
    Posts
    144

    A vba code to clear Active X Control Text Boxes

    Dear All,

    Please, I need your kind help with the correct vba code to clear Active X Control Text Boxes in a form and reset them for next entry

    I currently have a form which users are required to complete. The form contains both option buttons which users and Text Boxes (Active X Control). Users make choices using the option buttons and also type comments in the text boxes. Each completed form is supposed to be saved and cleared for next entry.

    Initially, we used ordinary text boxes, and the following code would clear both the option buttons and the ordinary text boxes and reset them for next entry:

    Please Login or Register  to view this content.
    The clearing and resetting worked fine, except that we had a few other problems using the ordinary text boxes, hence we decided to use the Active X Control Text Boxes.

    And now, the problem we are having is that with the above code, the option buttons will clear and reset for next entry, the code does not seem to clear the texts in the Active X Control Text Boxes.

    I need to point out that tne form is protected, and to enable users type in comments in the text boxes, we have, for each text box, gone to: Format Control > Properties > Protection and unticked the ‘locked’.

    I should be grateful for the correct code that will clear both the option buttons and the Active X Control Text Boxes and reset them for next entry, please.

    Thanks for your help.

    Newqueen

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: A vba code to clear Active X Control Text Boxes

    Hi there,

    See if the following code clears the Activex TextBoxes for you:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Last edited by Greg M; 06-24-2018 at 07:58 PM. Reason: Minor change to text

  3. #3
    Forum Contributor
    Join Date
    05-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007
    Posts
    144

    Re: A vba code to clear Active X Control Text Boxes

    Thanks very much Greg M. That's exactly what I needed, and that's very kind of you. I am grateful.

    Newqueen

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: A vba code to clear Active X Control Text Boxes

    Hi again,

    Many thanks for your prompt feedback and also for the Reputation increase - much appreciated

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

  5. #5
    Registered User
    Join Date
    06-09-2020
    Location
    San Pedro, Philippines
    MS-Off Ver
    Pro Plus 2019
    Posts
    3

    Re: A vba code to clear Active X Control Text Boxes

    Great! I am a newbie at hope to learn much from you folks. Thanks.

  6. #6
    Registered User
    Join Date
    10-27-2022
    Location
    Fort Worth, TX
    MS-Off Ver
    365
    Posts
    1

    Re: A vba code to clear Active X Control Text Boxes

    Thanks Greg, much appreciated as well.

+ 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 Text Boxes
    By vmjamshad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2018, 12:46 AM
  2. [SOLVED] Loop Clear Text Boxes
    By Johnny0811 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-05-2017, 10:32 AM
  3. [SOLVED] Help with code to reset all the Active X Option Boxes on Worksheet
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2015, 07:57 AM
  4. [SOLVED] code populates list boxes in active sheet, but does not populate boxes in subsequent sheet
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2014, 10:26 AM
  5. [SOLVED] Clear all text boxes-combo boxes in a userform.
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2014, 11:16 AM
  6. [SOLVED] VBA Code to have a repeating form control /Active X control (List box) in every row
    By Ehezve in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2013, 08:55 PM
  7. Copy Active X control and code
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2011, 12:11 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