combine two VBA codes

  • I need a help to combine these two VBA codes:



    and



    Thanks in Advance

  • Re: How to combine these two VBA codes please?


    Quote from cytop;773070

    Seems straightforward enough. What problems/errors do you get if you just combine them?


    In the beginning I'd like to thank you for your Advice in this thread http://www.ozgrid.com/forum/sh…00145&p=772518#post772518
    my file show a Run-time error 1004, I think that error refer to the conflict of "Worksheet_Change", so I tried to combine them but my tries were useless.
    this is my last step in the file, and I gave up.

  • Re: How to combine these two VBA codes please?


  • Re: How to combine these two VBA codes please?


    General answer only as you never mentioned where the error occurs, but perhaps the Excel object should be the Application object. I've never seen 'Excel.' used like that in VBA, only in Visual Studio code referring to
    Microsoft.Office.Interop.Excel


    There are other issues like exiting with EnableEvents still set False and one or 2 other things.

  • Re: How to combine these two VBA codes please?


    I won't download so I'll leave that for someone else.


    The issue is simple and probably could have been fixed if you had mentioned where it occurs, as I mentioned.

Participate now!

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