+ Reply to Thread
Results 1 to 7 of 7

Userform copy textbox value to different range depending on Combobox selection

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    7

    Userform copy textbox value to different range depending on Combobox selection

    Hello to all!

    I'd just started learning VBA.

    I'm working on a project that in one point it needs a userform with the following function:
    I will have a combobox with 3-4 values, and textboxes for each month (so 12 textboxes).

    What I need now is that the values from the month to be added in different ranges depending on the selection from the combobox.

    I hope somebody will help me out.

    Thank you a lot!
    Attached Files Attached Files
    Last edited by icsiszer; 07-11-2018 at 01:25 AM. Reason: Attached xls file

  2. #2
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Userform copy textbox value to different range depending on Combobox selection

    Can you tell what you have created so far in your Excel Workbook?
    And if you have a sample workbook, pls upload it.
    Even a little help can be a big help !!
    1. A sample workbook says more then words. Add problem description and solution so we can understand the problem.
    2. Your appreciation is accepted by clicking the star "Add Reputation" at the lower left of the post.
    3. If your problem is solved, mark it as [SOLVED]: See "FAQ : " https://www.excelforum.com/faq.php
    4. Use [CODE] [/CODE] tags to illustrate your code: see here

  3. #3
    Registered User
    Join Date
    08-05-2013
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Userform copy textbox value to different range depending on Combobox selection

    Quote Originally Posted by MarMo View Post
    Can you tell what you have created so far in your Excel Workbook?
    And if you have a sample workbook, pls upload it.

    Hello, yesterday I found an UserForm and I adaped it, but ow I have the issue with the command button. If the button is on different page the form doesn't work anymore, maybe you can help me with this.

    You can find my excel file in the main post!

    Thanks!

  4. #4
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Userform copy textbox value to different range depending on Combobox selection

    Hi,

    What do you mean by :
    If the button is on different page the form doesn't work anymore, maybe you can help me with this.
    I tested the button on another page, and the userform opens.
    I saw that the combobox was not populated as it should, so i made some adjustments in your code :

    Please Login or Register  to view this content.
    I uploaded your WB with adjusted code.
    Pls test to see if this is what you're looking for.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-05-2013
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Userform copy textbox value to different range depending on Combobox selection

    Capture.PNG
    On the other sheet if I open the form it show up, but when I select from the combobox it gives me that error.

    Actually I worked around this by activating the Target sheet, if the sheet is shown the form works great.

  6. #6
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Userform copy textbox value to different range depending on Combobox selection

    Glad to be able to help.
    And is your problem solved now?

    If so, pls close the thread by setting it to [SOLVED]

  7. #7
    Registered User
    Join Date
    08-05-2013
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Userform copy textbox value to different range depending on Combobox selection

    Yes the problem is solved, thanks a lot for your hep and advices.

+ 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. Copy, paste, and clear contents (i.e move) a range depending on combobox selection
    By ANDLU89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2018, 03:43 AM
  2. [SOLVED] Transfer to Textbox on Userform based on Combobox selection
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-07-2016, 07:25 AM
  3. [SOLVED] Need help transferring data from a userform to worksheet depending on a combobox selection
    By Annamarie in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2014, 11:11 AM
  4. [SOLVED] Userform textbox value based on combobox selection
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2014, 11:56 AM
  5. [SOLVED] UserForm - How To Make TextBox Value Change Depending On ListBox Selection
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 05:05 PM
  6. [SOLVED] Fill a cell via textbox on userform depending on combobox selection
    By Rhamilton2512 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2012, 10:29 AM
  7. [SOLVED] How do I make a selection from a combobox on my VBA userform populate a textbox?
    By ChristianMba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2012, 01:08 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