While I'm fine with experimenting with different Add-Ins, if you have a recommendation for one that suits well, it would be awesome. An add-in not only allows you to use a macro from any instance of Excel, but you can also edit your code and add new macros to a common repository from any instance also.
This Workbook should be active at the end of the procedure, but it is not.
Comment out the first line of code and This Workbook is active at the end of the procedure The actual code I was running when I first encountered the problem would cause a runtime error if This Workbook. I am guessing it is something to do with the SDI Excel 2013 uses. Screen Updating to true before This Workbook.activate and after to no affect. As a work-around I use a Msg Box at the end of the procedure, which for some reason activates Thiswork Book when Application. Name" is commented out then _ Book2is active at the end of the procedure _ Else _ This Workbook is active at the end of the procedure 'Msg Box This Workbook. Screen Updating = True End Sub Crossposted: microsoft.com/Forums/wpapps/en-US/…
The biggest problem I'm running into is that when I run the code (despite having Screen Updating set to False), it visibly opens the library file while it runs the macro.
To make sure this is efficient going forward, I want to prevent that from happening. Enable Events = False Dim bk As Workbook Dim result As Long Dim a WB As Workbook Dim a WS As Worksheet Set a WB = Active Workbook Set a WS = Active Workbook.
The workbook has a number of worksheets (mostly hidden) that are used for processing or as the final visible view - when opened, only one sheet is visible (used to launch the main sub).
While running, one of the subs unhides and activates the final worksheet, then deletes the starting worksheet - and toggles screen updating back on ("True"), and exits back to the main sub (which calls another sub again).
So it's not clear whether those are two separate test conditions.
I don't have 2013, so can't test, but I have seen similar issues posted about Excel 2013 and calling Thisworkbook.
But it doesn't change view, the view stays on the deleted sheet while the subs all finish.