+ Reply to Thread
Results 1 to 6 of 6

Excel code stopped working

  1. #1
    Registered User
    Join Date
    09-23-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    97

    Excel code stopped working

    I have some code that takes a validation list and enters it into a combo box which allows the user to use a form of autocomplete and then outputs the results into the desired cell, it used to work, but for a reason i cannot find the code has stopped working.. when i try copy pasting into a new workbook, it fails again!

    what have i messed up?

    Please Login or Register  to view this content.
    Last edited by Jollyfrog; 09-28-2010 at 06:51 AM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Excel code stopped working

    maybe:
    Please Login or Register  to view this content.
    If validationrules in the worksheet have been removed the code won't work. Start checking the worksheet.
    Last edited by snb; 09-28-2010 at 05:59 AM.



  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,376

    Re: Excel code stopped working

    Stopped working? What doesn't it do that it used to do? How long is it since it last worked? What's changed in the meantime? More data? Less data? New structure ... more or less columns? Additional worksheets? Updates to Windows, Office, Excel ... ?


    One way to test it is to comment out the error handling and see where it breaks. You could also put a break point on the code (Set ws = ActiveSheet) and step through (using F8) from there.

    For someone in the forum to provide assistance, it would be helpful if you uploaded a sample workbook with some typical, desensitized data.

    Regards

  4. #4
    Registered User
    Join Date
    09-23-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    97

    Re: Excel code stopped working

    hmm tried the suggested code... validation rules were active.. but no luck.. thanks for your sugestion!

  5. #5
    Registered User
    Join Date
    09-23-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    97

    Re: Excel code stopped working

    Quote Originally Posted by TMShucks View Post
    Stopped working? What doesn't it do that it used to do? How long is it since it last worked? What's changed in the meantime? More data? Less data? New structure ... more or less columns? Additional worksheets? Updates to Windows, Office, Excel ... ?

    same sheet and versions as previous the last change i made was the addition of small amount of code that i subsequently removed, can't be an update as i have another version that works ok, i tried copying the code across but no change in function..
    the current problem is that while it still imports the validation lists, when the combo box is altered the change is not carried through to the required cell!


    One way to test it is to comment out the error handling and see where it breaks. You could also put a break point on the code (Set ws = ActiveSheet) and step through (using F8) from there.
    i tried this also, and it errored on the line .LinkedCell = "" saying usupported
    then locked up completely.. refusing to update.. i created a macro to set Application.EnableEvents = true.. this seemed to remedy all problems... odd, at least i knwo what to do if i mess it up in future.. i guess it managed to fail without going though error handler resulting in Application.EnableEvents = true being set.. not sure how though...
    Thanks so much for your time, you been a great help.

    Jonathan

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,376

    Re: Excel code stopped working

    You're welcome. Thanks for the feedback.

    You can type Application.EnableEvents in the Immediate window ... saves creating a macro to do it.

    I'm still unsure what's changed ... if the code used to work, why doesn't it now? What's different in the version that does work?

    All academical perhaps ...

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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