Wait until Application.Calculate has finished

Further to my comments, you can use DoEvents with the Application.CalculationState. See this example Application.Calculate If Not Application.CalculationState = xlDone Then DoEvents End If ‘~~> Rest of the code. If you want you can also use a Do While Loop to check for Application.CalculationState I would also recommend see this link Topic: Application.CalculationState Property Link: … Read more

Determine whether user clicking scrollbar or content (onclick for native scroll bar)

Solved: A shortest scrollbar click detection I could come up with, tested on IE, Firefox, Chrome. var clickedOnScrollbar = function(mouseX){ if( $(window).outerWidth() <= mouseX ){ return true; } } $(document).mousedown(function(e){ if( clickedOnScrollbar(e.clientX) ){ alert(“clicked on scrollbar”); } }); Working example: https://jsfiddle.net/s6mho19z/

Calling a function when ng-repeat has finished

var module = angular.module(‘testApp’, []) .directive(‘onFinishRender’, function ($timeout) { return { restrict: ‘A’, link: function (scope, element, attr) { if (scope.$last === true) { $timeout(function () { scope.$emit(attr.onFinishRender); }); } } } }); Notice that I didn’t use .ready() but rather wrapped it in a $timeout. $timeout makes sure it’s executed when the ng-repeated elements … Read more