+ Reply to Thread
Results 1 to 6 of 6

Enter data into a userform text box to show in a specific cell in a specific worksheet

  1. #1
    Registered User
    Join Date
    10-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    12

    Enter data into a userform text box to show in a specific cell in a specific worksheet

    I am using a windows 7 and excel 2010 environment

    I am trying to write a simple macro that allows the use of a user form to add data into specific cells within a worksheet. I will be typing the data into a form text box.

    For example: On the User Form, Textbox 1 will have the data "1234.00" entered into it and that will need to be submitted into the nominated worksheet "January" into cell B7 on that worksheet, etc. etc.

    Has anyone got any ideas as I am totally lost on this one even after looking on google.

    Steve

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Enter data into a userform text box to show in a specific cell in a specific worksheet

    Hello Steve
    Find attached a basic example of a User Form. There are two sheets (January and February) whichever one is selected in Combo Box 1 the value of Text Box 1 is placed into cell B7 on that sheet after the 'Enter' button is clicked. This is very basic but perhaps will give you some ideas to work with.

    DBY
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Enter data into a userform text box to show in a specific cell in a specific worksheet

    Thanks for your reply. I will look at it and get back to you

    Steve

  4. #4
    Registered User
    Join Date
    10-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Enter data into a userform text box to show in a specific cell in a specific worksheet

    Hi DBY

    That works great thanks you very much and it was a great place to start for me to understand how it was working. I am however trying to work out how I would get the code to look at a different column. For example

    I your submission, it didn't matter if I chose January or February, the value when submitted would be in the same cell on the different months. In my worksheet I have all of the months in different columns on the same worksheet, I.e. January would be column A and then February would be column B and so on for the rest of the year.

    How would I adapt your coding to allow the user to select a different month, let's say APRIL and the data would load into column D

    Steve

  5. #5
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Enter data into a userform text box to show in a specific cell in a specific worksheet

    Hello Steve
    Sorry I thought you had different sheets for each month. Take a look at example 2 attached. There are two sheets. Sheet 1 just contains the month list for the Combo Box and Match function, the other sheet is the 'Database' where the values are entered. On the form input a value, select a month and click/press Enter and the value will be placed in the first empty cell in the chosen month's column.

    Hope this helps.
    DBY
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Enter data into a userform text box to show in a specific cell in a specific worksheet

    Hi DBY

    Thanks both your replies really helped me on the right path. Really appreciate your assistance on this and it is all sorted now. I even learnt how to use a "Case" statement

    Regards

    Steve

+ 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. Show Userform if cell with specific text is pressed
    By mason0567 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2015, 10:26 PM
  2. Enter Data from userform into cells starting from specific cell
    By jtemp57 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2014, 04:26 PM
  3. Enter data under specific Range (columns) via userform and combobox
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2014, 12:01 PM
  4. Userform to enter data to specific cell + more
    By steve_from_the_uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-03-2013, 03:52 PM
  5. Replies: 3
    Last Post: 09-20-2013, 04:24 PM
  6. Transfer specific data on specific worksheet using userform
    By kriscar_44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2010, 04:03 AM
  7. Enter text into a specific cell using a userform
    By Cushionsupplier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2010, 05:38 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