excel - Is there a way to put a breakpoint when my active window changes? -
is there way put breakpoint on activewindow.change
? have macro run in new, unsaved excel file, supposed open csv file, save as, process it, , keep in focus. instead of that, when macro done selects empty new file unsaved, , puts csv in background. happens though use code below, before end sub
:
wkb1.activate wkb1.sheets(1).activate wkb1.sheets(1).range("a1").select
the thing 3 rows of code above set focus correctly, @ end sub switches unsaved file.
i thinking if can set breakpoint whenever active window name changes, can catch when happens, because macro i'm working huge, , can't find bug manually.
kind regards, daniel
the fix quite stupid, fixed issue creating new ribbon tab , run macro ribbon instead of running vba. removed , activate o select commands. macro behaving same, after removed activate , select commands, thing fixed running new menu.
Comments
Post a Comment