+ Reply to Thread
Results 1 to 2 of 2

Code in userform combboox

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Code in userform combboox

    Hello,
    I have this strange problem with my code and i just can't seem to figure out the issue.
    The code below is situated in a userform and when a customer is selected from the combo-box drop-down the code checks whether the customer exists in my "customer database" which is one of the tabs on my excel workbook.
    So if the customer exists then the code writes the customer into the active sheet (not the customer database sheet), and if the customer does not exist then the code prompts the user with the following: "This customer is not in the customer list. To automatically add this customer to the list click Yes." When "yes" is selected the code adds this customer to the customer database and adds the customer to the active worksheet.

    The issue i am having is very strange, most times the customer gets added to the activesheet, but sometimes the customer does not get added.
    i would really be grateful to anyone who can help me solve this problem.

    This code is Before update event
    Please Login or Register  to view this content.
    This event (which belongs to the same combo-box) is a change event
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Code in userform combboox

    i played around a little with the code and changed the red font:
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    I'm not entirely sure why this change helped but i haven't had any issues since.
    If anyone can explain the reason to me that would be great

+ 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. Re-code Userform to open range of sheets like previous sheet code
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2014, 02:31 AM
  2. Exit Userform to return to main code, but keep userform open
    By jombler74 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-04-2014, 04:01 AM
  3. UserForm help - display list of open workbooks except workbook userform code is in
    By kensweep in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2014, 12:26 PM
  4. [SOLVED] Userform code fails when the userform is called from a custom ribbon button
    By klonbeck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 03:00 PM
  5. [SOLVED] VB Code to Call Userform in Userform
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-22-2012, 04:47 AM

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