+ Reply to Thread
Results 1 to 4 of 4

Userform to enter data

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Utah, USA
    MS-Off Ver
    Excel 2007
    Posts
    35

    Userform to enter data

    Im learning my way around userforms and this is probably a rookie question but I'm trying to figure out how to have a text box display the contents of a cell but if I enter text into the box have it replace the contents of the cell it read from.
    For example, if my A1 contained "Good bye" my form would display that but if I type in "Have a nice day" in the text box (Textbox1) it replaces whats in A1 with that text string.
    Im sure its simple (thats part of what forms are for) but I dont understand how to make it work.

    Thanks in advance!

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Userform to enter data

    Hi
    to show A1 contents in text box, you can put in userform activate event like:
    Please Login or Register  to view this content.
    and A1 to replace the text box content

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Userform to enter data

    Try this out
    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-14-2012
    Location
    London
    MS-Off Ver
    Excel 2003 - 2010
    Posts
    9

    Re: Userform to enter data

    Hi,

    I'm only new here but If you want to use the UserForm for input the I would suggest linking the Textbox on the UserForm with the Cell you require.

    Doing this is quite simple. If you highlight the TextBox and then look at the TextBox properties in the VBA Editor where you made the userForm and scroll down the list you will find one called "ControlSource".

    All you need to do is now direct this to the Cell you want and type in as an example =Sheet1!A1

    You have now linked the two together and from now on what ever you type in the text box will change on the worksheet and visa versa.

    Hope this is what you were after.


    Cheers
    No Problems, Only Solutions

+ 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