+ Reply to Thread
Results 1 to 4 of 4

Real time update of Userform label with cell value

  1. #1
    Registered User
    Join Date
    08-29-2008
    Location
    United States
    Posts
    3

    Real time update of Userform label with cell value

    hi,

    I have search for some info regarding real time update of Userform label with the cell value but I got no luck. I hope some excel experts here can help me. I have a userform with a label. I would like to have that label be updated in realtime each time the cell value on the worksheet changes. Say cell value A3 has 150, in my Userform label caption appears as 150. If A3 cell value changes to 200, the label in my Userform changes to 200 as well at the same time. Is this possible using excel vba? Im new to this language but interested to learn. Thanks!

    Kyle

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    How are you changing the cell/ To change the cell other than by code from the UserForm would need the UserForm to be modeless.

    If you use a TextBox instead of a label you can set it's ControlSource to the cell. The TextBox would update automatically. However, any changes to the textbox would change the cell's value. To get round this change the TextBox's Enabled property to False.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-29-2008
    Location
    United States
    Posts
    3
    hi,

    Quote Originally Posted by royuk
    How are you changing the cell/ To change the cell other than by code from the UserForm would need the UserForm to be modeless.
    The cell value changes according to the sum given from column B and C. I have no idea what Userform modeless is. Sorry still learning vba

    Quote Originally Posted by royuk
    If you use a TextBox instead of a label you can set it's ControlSource to the cell. The TextBox would update automatically. However, any changes to the textbox would change the cell's value. To get round this change the TextBox's Enabled property to False.
    How do I set the control source thing? Can you show me?

    Thanks,

    Kyle

  4. #4
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Real time update of Userform label with cell value

    Go to VBA editor(alt+F11) then click on the textbox you would like to modify, then in the Properties box you will see "Control Source" followed by a blank box, enter the cell you would like to associate with that textbox.
    P.S. if you do not see the properties box go to View, then "properties Window"

+ 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. Spin Buttons - Linked Cell to update when copied?
    By svpdebbie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-14-2017, 09:18 AM
  2. Display Cell Value on UserForm Label
    By Burke in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2008, 06:59 PM
  3. Pasting value of a linked cell
    By emilis in forum Excel General
    Replies: 1
    Last Post: 07-24-2008, 08:54 PM
  4. Userform putting info into designated cell
    By Toadums in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2008, 12:47 PM
  5. Assignment overDUE PLEASE PLEASE HELP!!
    By undergrad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2006, 12:34 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