+ Reply to Thread
Results 1 to 3 of 3

Using "Enter" procedure for a Class control

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010, 2013, 2016, 365
    Posts
    79

    Exclamation Using "Enter" procedure for a Class control

    Hi All,

    I have a Class Module from which a set of TextBox controls are dynamically created in a UserForm. It is all working fine but I don't seem to be able to create a declaration that will trigger when the TextBox is entered or exited.

    For a standard TextBox created manually in a UserForm you can add a Private Sub txtbox_Enter() procedure but there isn't the option for this declaration in the Class Module.

    Any thoughts?

    Thanks,
    Ad

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using "Enter" procedure for a Class control

    Ad

    The Enter, and Exit events for a textbox controls aren't available in a class I'm afraid.

    What is it you are trying to do on entering the textbox(es)?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-28-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010, 2013, 2016, 365
    Posts
    79

    Re: Using "Enter" procedure for a Class control

    Hi Norie,

    I had a feeling this was the case :/

    Basically I'm trying to make it such that when a text box is entered, the contents is cleared of all formatting - for instance a text box with value "£ 1,234.50" will switch to "1234.50" when entered and then the value will be re-formatted again on exit.

    Any thoughts on another way to achieve this?

    Thanks!
    Ad

+ 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] can vba control "when press enter, selection move direction"
    By mrkhchan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2014, 10:56 AM
  2. Put 4th "td" tag for each class name "togo" into cell values
    By b.hill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2014, 10:53 AM
  3. Problem with X Control "**** Class"
    By Empatronix in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2013, 01:09 AM
  4. Enter Data on "Main" or "Input" Sheet and Copy to One of Many Other Sheets
    By timothy_no7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 07:29 PM
  5. [SOLVED] Scroll Bar missing "Control" tab in "Format Properties" dialog box
    By Peter Rooney in forum Excel General
    Replies: 5
    Last Post: 02-14-2012, 01:45 AM

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