+ Reply to Thread
Results 1 to 6 of 6

Userform doesn't apply data in correct place! Please HELP!

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    Iowa
    MS-Off Ver
    2010
    Posts
    17

    Userform doesn't apply data in correct place! Please HELP!

    I took a look at it and tried to figure out why the code wasn't working, but I can't figure it out. It's in the Products tab of the workbook. I need the combobox to send the data to the specific list and the general list. It already sends it to the general list. Had someone help with this on a different workbook, but can't figure it out on this workbook.

    If you can help, please explain what I was doing wrong, so I can correct in the future.

    The data needs to also go to the column in which the combobox list is specified.

    Please help, I will gladly add reputation!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Userform doesn't apply data in correct place! Please HELP!

    You attached a workbook with many hidden sheet, why ? what is your problem ? what userform ? you have 2.
    Please explain better.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    06-17-2014
    Location
    Iowa
    MS-Off Ver
    2010
    Posts
    17

    Re: Userform doesn't apply data in correct place! Please HELP!

    Sorry, I thought I explained it well. The only sheet that matters is products. The macro I'm having trouble with is inventory. In the inventory macro it has two text boxes and a combo box. One function of the user form is that it adds all three values to the general list in column N. That works just fine. The other function is that I would like it to add the data to a specific list (herbicide,disease etc..) based on whatever the combo box value is. If you run the inventory macro it will show you where the error is. In the vba code it's the selcol and selrow code that aren't doing what they should. I tried to figure it out. But can't.

    Hope this explains more. Thanks for looking.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform doesn't apply data in correct place! Please HELP!

    Your Match for SelCol uses a range with 2 rows, A1:AA2, so gives an error.

    The range should be one row A1:AA1.

    There's also some code you don't need in the sub, try this.
    Please Login or Register  to view this content.
    Oh, and don't use End for the Exit button, use Unload Me.
    If posting code please use code tags, see here.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Userform doesn't apply data in correct place! Please HELP!

    Hi Afrabat

    I have revisited this as per your request.

    Norrie has found and fixed your error for you.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-17-2014
    Location
    Iowa
    MS-Off Ver
    2010
    Posts
    17

    Re: Userform doesn't apply data in correct place! Please HELP!

    Thanks guys!! Added reputation to both!!


    I have another question in the same workbook. I figured why start a new thread since It's all right here.

    It's another VBA question also.

    It's about the other macro in the workbook. This one is called customer. It is for adding a new customer to the list. I have a macro going already and it does a basic job. However, what I would like to do is add two option buttons (already added) and code them to put the data in one spot or another depending which option button is activated. I have never used option buttons so I'm not sure how this would be coded.

    The data is on the customer list sheet.

    When entering a new customer with the customer macro I would like to be able to press residential and have it go to that column. Or press Commercial and have it go to that column.

    Any help would be greatly appreciated and I would add reputation for it!

    Here is the latest version of the workbook.
    Attached Files Attached Files
    Last edited by afrabat; 08-24-2014 at 04:23 PM.

+ 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] Apply data validation in Userform
    By IKZOUHETNIETWETEN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2013, 03:03 PM
  2. [SOLVED] Code to place userform data into next empty row
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-11-2013, 01:06 PM
  3. [SOLVED] Problems selecting correct data after filter is in place
    By DarthWire in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2013, 06:18 AM
  4. Apply function to the data pasted into userform
    By wali in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2010, 03:36 AM
  5. [SOLVED] Userform finding next row to place data
    By BrianW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2006, 05:45 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