Posts

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?”

Arrays as best tables alternative in Excel VBA

As I mentioned in the title – arrays are awesome. This is one of the main things You should learn working with Excel VBA. In case of data, I think I can safely say, that arrays are amazing alternative for tables in VBA. To prove that statement I’d like to start with 1-dimension array.
But first things first – You may ask:

What the heck are thooose arrays?!

Continue reading “Arrays as best tables alternative in Excel VBA”

Find a phrase in Word and Adobe files

I just got an idea to make a little searcher, I mean the tool to search through and find a word, or whole phrase, in Word or Adobe files.

Let’s imagine the situation: You’ve got folder with procedures. Lot’s of procedures. Some of them are Word file (.doc, .docx etc.) and some of them in Adobe Acrobat Reader (.pdf). You want to find procedure, which is about something, but don’t really remember which one was it. The only thing You remember is that, for sure, there were some specific words. So… lets get started!

Continue reading “Find a phrase in Word and Adobe files”