Results 1 to 7 of 7

User Form TextBox Events

Threaded View

max57 User Form TextBox Events 02-22-2010, 09:35 AM
romperstomper Re: User Form TextBox Events 02-22-2010, 09:47 AM
max57 Re: User Form TextBox Events 02-22-2010, 09:57 AM
romperstomper Re: User Form TextBox Events 02-22-2010, 10:05 AM
max57 Re: User Form TextBox Events 02-22-2010, 11:16 AM
Huron Re: User Form TextBox Events 02-22-2010, 01:47 PM
max57 Re: User Form TextBox Events 02-22-2010, 02:07 PM
  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    User Form TextBox Events

    Hi folks,

    I need some advice on coding a Textbox event.

    I have a UserForm that utilizes the Change event of a Textbox.

    The form goes through some validating before any calculations happen.

    My problem is if the user wishes to backspace, clear or perform any changes to this textbox, it bugs out.

    Here's the code:
    'Validate that all the necessary data is entered before running sub
    Private Sub ComboBox1_Change()
    
        If TextBox1.Value <> "" And ComboBox2.Value <> "" Then
        Call ConvertCalc1
        Else: Exit Sub
        
        End If
        
    End Sub
    
    'Validate that all the necessary data is entered before running sub
    Private Sub ComboBox2_Change()
    
        If TextBox1.Value <> "" And ComboBox1.Value <> "" Then
         Call ConvertCalc1
        Else: Exit Sub
        
        End If
        
    End Sub
    
    'Validate that all the necessary data is entered before running sub
    Private Sub TextBox1_Change()
    
        
        If ComboBox1.Value <> "" And ComboBox2.Value <> "" Then
         Call ConvertCalc1
        Else: Exit Sub
        End If
        
    End Sub
    I'm sure it's easy to fix but I've painted myself into a corner on this one.

    I've included the file for reference

    Thanks!

    Mark
    Attached Files Attached Files
    Last edited by max57; 02-22-2010 at 02:08 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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