+ Reply to Thread
Results 1 to 6 of 6

On Close Clear ComboBox1 - ListIndex -1 and Clear not working

  1. #1
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    Hi all, I'm trying to reset an ActiveX ComboBox on closing of a workbook and am struggling to get it to work (the rest of my BeforeClose code works fine). This is my code for before close on ThisWorkbook:


    Please Login or Register  to view this content.

    I've tried a couple of different methods which I've left in but commented out so as I know what I have already tried when it comes to attempting each. Am I doing something really simple wrong as often the case?

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    You could try
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    Thanks gmr, that didn't work for me. I've also tried these to no avail:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    Sorry, how about
    Please Login or Register  to view this content.
    That is the code I use for mine.

  5. #5
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    That one didn't work either, thanks anyway for helping though. Never mind, I'll just have to hope the user doesn't Ctrl+S it and then it will open at the top of list where I've saved it to.

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: On Close Clear ComboBox1 - ListIndex -1 and Clear not working

    k, sorry I couldn't 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. [SOLVED] Clear All Dropdown Listindex
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2014, 01:14 PM
  2. [SOLVED] Clear contend of Pivot table on close.
    By ZuneidDassu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2014, 07:47 AM
  3. Replies: 1
    Last Post: 06-21-2013, 04:05 AM
  4. [SOLVED] Clear button, add warning dialogue box that asks: Are you sure you want to clear?
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-21-2012, 02:41 PM
  5. Close document and Clear data
    By athard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2010, 12:41 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