Month: December 2013

C# – Display Folder Contents with Console Application – Directory Info Usage

With the current console application we display the contents of a given folder. It is a little useless by itself, but the code has one good advantage – it shows perfect application of DirectoryInfo and some properties as .FullName &

VBA – Excel – Remove Print View Lines

If you need to remove the print view lines, the easiest was is to do it with a macro 🙂 Actually, there should be other ways to do it and there are other ways definitely, but the workaround them (reading

VBA – Excel – Activate Sheet Based on Value on Another Sheet

With this macro we do not actually add something new – it simply does something, which is quite useful if you are working with big documents where you should select the data, based on different values. In the current example,

Tagged with: ,

VBA – Excel Change Formulas to Values

Changing formulas to values is something really easy in MS Excel – what the majority of people (including me) would do the following – simply record a macro, where you select all cells and paste them as values. The result

Tagged with: , ,

Excel – Array Formula for Count of Unique Values

The following formula shows something I did not know for a long time – it counts unique values just like that! Before knowing the existence of this formula, people (including me) had to do a lot of workaround simply to

C# – LINQ – Where, OrderBy, Select

In the current code, we simply show how to use “OrderBy”, “Select” and “Where” in LINQ. If you want to know more about LINQ, you should refer to here. This time Microsoft has written a really good article about this.

VBA – Start and end of a macro – optimization

If you work with VBA macros, you probably have a few lines of code, which you write before you start the actual coding. In this area we include turning off calculations, displaying alerts and screen updating. With other words, this

VBA – Group sheets based on their names

Sometimes you simply want to do an action in a file to all sheets, but not to the two important ones, named “Important1” and “Important2”. In this case, you may use a simple for/each loop with a select case option.

VBA – Hide specific range per each sheet + formula for tab

In this article I will simply combine two different subjects – creation of formula, displaying the name of the tab and hiding a specific range per each Excel sheet. Concerning the formula, here it is: =REPLACE(CELL(“filename”,A1),1,FIND(“]”,CELL(“filename”,A1)),””) Concerning the VBA code:

VBA – How to delete quickly all pictures from Excel?

Probably, if you are programming with Excel as much as me, one day you have the following question – all the pictures in Excel are generated by my code and I really do not care to give them names. I

Tagged with: , , ,

C# – Calculating square root with two classes

This program will calculate square root with two classes. It is really a fascinating program, due to the fact that it uses precalculation in the class SqrtPrecalculated. Thus, if you need plenty of calculations, once the values are precalculated it

VBA – send an e-mail from Excel, using MS Outlook and HTML

With this article I will simply present you with a solution, combining HTML and VBA, exporting a graph from excel to MS Outlook e-mail. The HTML part is a little complicated and not very flexible, but anyhow – it is

Tagged with:

VBA – Excel – Lock macros from viewing

With this short article I will briefly explain how to protect your VBA code from viewing from 3rd parties. It is as simple as that: 1. Open the Visual Basic Editor. 2. On Tools select “VBA Project Properties.   3.

VBA – Excel – Adding “iferror” to many cells with one macro

Have you ever had the case to develop a whole solution and at the end someone to tell you the following: “You know, it works well, just insert IFERROR and it is ready to be submitted.” Then you start rebuilding

Book Review – Introduction to Programming with C# – Free Book!

This is the first book, which would be reviewed on the site It is probably the best free programming book (as far as I have never heard of another free programming book) for C#. About 1000 of junior Bulgarian

Tagged with: ,