+ Reply to Thread
Results 1 to 10 of 10

Textbox auto update

  1. #1
    Registered User
    Join Date
    05-11-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Textbox auto update

    I’m just starting to learn the VBA process with Excel, this problem is probably very basic so forgive me.
    I have a cell in excel that is linked to a textbox, if you add text to the textbox it will update the cell. If you close and reopen the application you need to click the textbox to show the value previously added to the cell, can this be viewed automatically.
    Here is my code:
    Please Login or Register  to view this content.
    Last edited by iainj; 05-11-2009 at 11:02 AM. Reason: add code tags

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Textbox auto update

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Textbox auto update

    Your code is triggered by events of the textbox and so the textbox has to be selected.

    Where is the textbox?

  4. #4
    Registered User
    Join Date
    05-11-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Textbox auto update

    Sorry about the code location ........
    The textbox is located on UserForm1

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Textbox auto update

    You can set the TextBox's ControlSource Property to A1. This will display A1's value in the textbox & any changes to the textbox or cell will update

  6. #6
    Registered User
    Join Date
    05-11-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Textbox auto update

    Wow that was easy, i thought i would have to write lines of code!
    Thanks
    Last edited by iainj; 05-11-2009 at 08:37 AM.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Textbox auto update

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Registered User
    Join Date
    10-21-2013
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Textbox auto update

    Hi Guys,

    and waht about updateing the TextBox while macro is running. I've got the text box drawn directly on my spredsheet (so not UserForm) where i want to display files created. The problem is that the displayed message updates only at the end - when macro is not running anymore. So I can only get the message"Done..." which ist the last one of course : ).

    Ive tried to use Repaint method but its not working!
    Please Login or Register  to view this content.
    Any suggestions.

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Textbox auto update

    hazy13

    Welcome to the forum.

    Unfortunately you have to start your own thread as per forum rules.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  10. #10
    Registered User
    Join Date
    10-21-2013
    Location
    PL
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Textbox auto update

    OK, thanks for you suggestion, i will do so! Regards!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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