Else if for rtarget not working

  • Good day all,

    Any help would be greatly appreciated.

    I have an estimating program that utilizes macros to set up drop down lists and set formulas. all works fine except for the last item.

    scenario is you pick from thew first drop down. depending on the answer certain actions occur. for the last item "Pipe" once it is picked the cursor jumps to a new drop down. Once you pic from that the cursor jumps again to a new drop down. the issue? the second jump doesnt occur. The code doesnt error out. it just does nothing.

    Here is a sample

    I originally had the block at the end as a seperate global macro called Macro1. but either way whether calling it up that way or embedded in the main code it still does nothing

    Any help would be greatly appreciated

    I am actually going to upload the file. The sheet im currently woking in is labeled L&M#1. Once that one works I will be reusing the code for other sheets.


  • Step through the code, in your code you are changed cells for instance, : Target.Offset(, 9) = "ft", when you hit that line, you are activating the Worksheet change event again, so it takes you back to the beginning of the code. You would have to use `application.enableevents=false` inorder for the code not to kick in again, then`application.enableevents=true` when you want the code to kick in again.

  • No, Just one space to the next dropdown. However it now works. the issue was cell formatting on the sheet causing the code to not work, but because of the on error line it wasnt showing as an error it was just moving to the next operation which ended the routine

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!