+ Reply to Thread
Results 1 to 10 of 10

Macro does not run after a data entry form has been opened

  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Macro does not run after a data entry form has been opened

    I have a workbook with 2 sheets of data in list form. one list is around 500 rows long and the other has over 2000 rows.

    I have both sheets set up with the following code to locate rows for editing if necessary.

    Please Login or Register  to view this content.
    One sheet has a target range "A" and the other sheet is "B". Both work properly until I open a data entry form on a third sheet. Once the form has been opened both codes stop working until I close not only the file but I have to close Excel as well. Upon re opening the file both codes work fine unless the form is opened then they cease to function. It makes no difference weather any data has been entered or not, open the form and nothing.

    Here is the code for the entry form so you can see what is going on with both codes.

    Please Login or Register  to view this content.
    Thanks,
    Jim O
    Last edited by JO505; 02-10-2013 at 08:20 PM.

  2. #2
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Macro does not run after a data entry form has been opened

    Any ideas on this issue?

    Jim O

  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Macro does not run after a data entry form has been opened

    Still having an issue with this.

    The only codes in the workbook are the two to find the rows. They are on separatete sheets, one for column "A" and on another sheet one for column "B"), a code to open the user form, another code to close the user form and one to run the user form.


    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    I open Excel and the file and all codes work fine. If I open the user form the codes to search for the row stop functioning. I can get it to work only but cloclosethe file, cloes Excel and reopen. then it all works until the form is opened.

    Any help would be appreciated.

    Jim O
    Last edited by JO505; 02-08-2013 at 12:34 PM. Reason: Ran into a glitch wrapping the first code.

  4. #4
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Macro does not run after a data entry form has been opened

    This is driving me nuts.

    I removed all the code and started to reenter them in an attempt to isolate the problem.

    With all other code removed everything works fine with the row find code. As soon as I put in the code to open the form the row find code stops working. I have no idea what I can do to correct this situation.

    The open form code is shown below.



    Please Login or Register  to view this content.

    Any input would be greatly appreciated.

    Jim O

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro does not run after a data entry form has been opened

    Hi Jim O

    I think you'll need to show us your file, with existing code, so we can help you debug it.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: Macro does not run after a data entry form has been opened

    Just a hunch, but Application.EnableEvents = False might be the culprit.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Macro does not run after a data entry form has been opened

    yes that's the problem-why does the code disable events when opening the form? you should disable events only in a procedure that requires it and then re-enable them at the end of that procedure.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  8. #8
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Macro does not run after a data entry form has been opened

    Here is the database. When I open the form on the Shaft Flex chart page the lookups on the WOODS page, the Compiled List page and I just discovered it also affects row lookups in other workbooks that are open. The only way to make the row lookups work again is to close not only the file but Excel as well.

    Thanks

    Jim O
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Oklahoma
    MS-Off Ver
    Office 2007 / Office 2010
    Posts
    123

    Re: Macro does not run after a data entry form has been opened

    You've got two items you're turning off without ever turning them on again. Find these two lines and either comment them out or delete them.
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Macro does not run after a data entry form has been opened

    Yraen,

    Thank you for your insight on this. That seems to do the trick. I will mark this as solved.

    Thanks to all for their replies.

    Jim O

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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