+ Reply to Thread
Results 1 to 16 of 16

TextBox Change Event HELP

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,101

    Re: TextBox Change Event HELP

    If the above 3 requirements are not able to met, then I'm willing to take out the '%' sign. Which means point 1 and 2 has to be met

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

    Re: TextBox Change Event HELP

    Public oldvalue As Double

    Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

    temp = TextBox1.Value
    If Not IsNumeric(temp) Then temp = oldvalue
    oldvalue = temp

    TextBox1.Value = Format(oldvalue / 100, "0.00%")

    End Sub

    Private Sub UserForm_Activate()
    If IsNumeric(TextBox1.Value) Then
    oldvalue = TextBox1.Value
    Else
    oldvalue = 0: TextBox1.Value = Format(0, "0.00%")
    End If
    End Sub

+ Reply to Thread

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