+ Reply to Thread
Results 1 to 4 of 4

VBA Code to automatically update label in the userform

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    VBA Code to automatically update label in the userform

    Good Morning All,

    I have a user form with a textbox and few labels and also some few other textboxes. When I enter a value in textbox2 it automatically updates the labels and other textboxes. But when I delete the value entered in the textbox2 it is not removing the data in the labels and other textboxes.

    Please help me on this..

    Thanks in advance...

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,446

    Re: VBA Code to automatically update label in the userform

    What is the code you have behind the userform and the controls you are updating? Please supply the sample workbook along with what you are trying to accomplish. It is much easier to help when we can see what you have and what you are trying to do.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: VBA Code to automatically update label in the userform

    Please see the Userform - "EWS" in the attached file.

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,446

    Re: VBA Code to automatically update label in the userform

    Hi,

    It looks like you have code behind the Userform and behind Textbox2. You have an event behind textbox2 that reads:

    If IsNumeric(Me.TextBox2.Value) Then

    Which will only fire if what you've typed in the textbox is numeric. When you delete anything in the textbox it no longer is numeric and your code is skipped over.

    This seems like the problem you are describing. You may need to add some code that is something like:

    If IsNumeric(Me.TextBox2.Value) ="" Then

+ 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. How to Update userform : listbox1 update automatically
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2014, 11:28 AM
  2. Use variable as name for label in userform, dynamically update different labels
    By seaofgreen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2013, 04:12 PM
  3. Trying to Update Userform Label with worksheet cells
    By bmoon171 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2013, 07:59 PM
  4. Real time update of Userform label with cell value
    By KyleLee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2009, 09:58 AM
  5. Dynamic Userform doesnt update label caption
    By Heresy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2009, 11:59 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