+ Reply to Thread
Results 1 to 5 of 5

Userform reopens once after closing when activated via listbox

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Northamptonshire
    MS-Off Ver
    Excel 2010
    Posts
    9

    Userform reopens once after closing when activated via listbox

    I have two userforms, the first list suppliers by name in a listbox. When you select one of the suppliers in the listbox a second userform opens showing details of that supplier by using key data in the listbox and extracting data from a spreadsheet based on that unique key. All this works fine, however, the problem occours when the second userform is closed, it immeadiatly re-opens.. If you then close it closes OK. I am using office 2007 at work.

    If I take the project home it works perfectly OK, but I use office 2010 at home. So I am at a loss as to what is causing the issue.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Userform reopens once after closing when activated via listbox

    Hello aic,

    I just checked with my Magic 8 ball about the problem: Reply hazy try again.

    It seems you need to post your workbook to get an answer.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    Northamptonshire
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Userform reopens once after closing when activated via listbox

    File uploaded as suggested.
    Attached Files Attached Files

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Userform reopens once after closing when activated via listbox

    Please Login or Register  to view this content.
    Is firing the click event for that listbox. What are you trying to achieve with this?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  5. #5
    Registered User
    Join Date
    01-30-2013
    Location
    Northamptonshire
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Userform reopens once after closing when activated via listbox

    Many thanks for your assistance.

    I cannot recall exactly why I had that code there. I think I was trying to remove focus from the listbox; when userform2 is closed the selection remains highlighted in listbox on userform1.

    Once again thanks for your help.

+ 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. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  2. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  3. Open Userform when sheet is activated
    By abz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2010, 11:32 AM
  4. [SOLVED] getting activated userform name
    By x taol in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2006, 09:00 AM
  5. Excel reopens workboog after closing it.
    By Fred Flintstone in forum Excel General
    Replies: 1
    Last Post: 10-21-2005, 10:05 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