Progress bar refresh – macro performance

In my previous post I already described how to create simple progress bar and how to implement it into code. It is so much better to watch the macro performance, than freezed screen. In case You have to stop macro, it is even easier to do this with bar, than without it. But I have never thought about what impact have that visualization of progress bar on macro performance.

Continue reading “Progress bar refresh – macro performance”

Connect to SAP via Excel VBA

This was my first main automation in Excel VBA. I was working a lot on SAP data and modifying it in Excel on the daily basis. Almost every day tons of same routine for get the data. One day I thought to myself about automation. I knew that I can record my activity in Excel, but did not know at all how to connect to SAP using Excel VBA?

Connect to SAP via Excel VBA
Continue reading “Connect to SAP via Excel VBA”

Array vs table – store color property speed comparison

All in all, array is awesome to operate on big data. It is much faster vs standard Excel table. But how they gonna behave in the situation presented like in where I’m using 3rd dimension to store color property in array?

Continue reading “Array vs table – store color property speed comparison”

Can arrays store cell color property?

I am big fan of arrays. Since I found out about arrays I have been trying to use them everywhere! Or maybe just there where it is possible.
I recently wrote about them, if You missed it I highly recommend reading my post We all know that arrays can store values, for example 2 dimensional array can hold a Excel table values. But can arrays store cell color property?

Can arrays store cell color property?
Continue reading “Can arrays store cell color property?”

Progress bar – simple thing to watch your Excel macro

Starting to code in VBA always wanted to see that loading rectangle as a progress bar to watch the working macro, for instance like in every software or game installation. Not only for fancy issue, but mainly to know in which point of macro I am.

So, what do we need to have a progress bar?

First of all, we need to create a form. It should have at least 1 textbox or label and the main thing – frame and label inside that frame.

Progress bar- Simple Excel VBA
Continue reading “Progress bar – simple thing to watch your Excel macro”

For vs For Each – which is faster?

Some time ago, when I was learning about looping I read that “You should avoid For Each loop when it is not necessary” or something like that. From that time I was trying to use only For loops. You can imagine my surprise when some guy with over 50k reputation points on StackOverflow said to me encouraging to use For Each, because it is faster! So which is faster – For vs For Each?

for vs for each which is faster

So why not check it? 🙂

Continue reading “For vs For Each – which is faster?”