+ Reply to Thread
Results 1 to 4 of 4

Get Data from a cell into TextBox1 in Userform?

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Get Data from a cell into TextBox1 in Userform?

    Hello Excellers,

    I am struggling with making the userform able to get the data from a cell in a worksheet and pass it to textbox1 when it is opened. The data from the cell is refreshed every time the workbook opens (using external data: web source data).

    The code I wrote on the userform is:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What am I writing erroneously?

    Let me know! Thanks!!!
    Last edited by excellenthelp; 03-22-2014 at 06:13 AM.

  2. #2
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Get Data from a cell into TextBox1 in Userform?

    Or... the textbox1 can be replaced with a Label as well...

    Thanks!

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Get Data from a cell into TextBox1 in Userform?

    Hi, excellenthelp,

    you donīt state what isnīt working.

    Maybe use the Activate-event of the Userform (code goes behind the UF):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Get Data from a cell into TextBox1 in Userform?

    Holger,

    The textbox kept returning EMPTY.

    Here's what I did... I changed from a textbox to a label and wrote a line to automatically update the caption of the label when a cell value is updated. This works.

    I will look into your code soon.

    Thanks!

+ 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. [SOLVED] Userform Textbox1 = Val(Textbox2.Value) / 2
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2013, 09:37 AM
  2. If textbox1 is empty then put paste some default text to textbox1
    By vijaynadiad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 03:16 PM
  3. [SOLVED] Troubles: setting userform- Textbox1 as a range
    By baggypants in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 01:55 PM
  4. Copy data from textbox1 to column A till end of cell data of column B
    By JoaoFerreira1985 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-12-2013, 01:19 PM
  5. [SOLVED] Outlook UserForm Textbox1=Subject
    By NewGuy OnBlock in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2012, 06:47 PM

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