# practice exercise for learning VBA



## delbian

Hi, I've been trying to learn VBA from books because I have no practical way to develop my skill (eg. work problems).
I have a good understanding of the theory, language, etc... but am just not picking it up.
I think the only way is to 'do it' by solving problems.

Can anyone suggest where to find a resource of practice exercises (and solutions), starting with simple things?

Much appreciated, thanks.


----------



## Zack Barresse

Hi there, and welcome to the board!

You've found it!!  Start by trying to help people, or checking others solutions.  At least that was the best way for me.  Plus you get to give back to people!


----------



## Michael M

Hi, and welcome to the board 
The board is always a good source of help for coed and code based solutions, but I have found the best way to learn is to get a building type book.
That is, as you read through the book it provides code examples to write.
Don't get into the habit of shortcutting and copying and pasting because you won't learn anything that way.
I started with a book called "Excel Programming" by Jinjer Simon.
Having said all that I still have to come to the board for my more "advanced" stuff, but I think my skill is improving.

HTH
Michael M


----------



## VoG

I would say follow firefytr's suggestion. And don't be embarrassed - you may find that by the time you've spent 30 minutes writing 50 lines of code somebody got there before you with 10 lines of code?  So what - at least you learned whilst you were coding and you can learn from the more efficient solutions posted.http://www.mrexcel.com/forum/member.php?u=22953


----------



## Zack Barresse

Well said VoG II.  If you haven't failed, you haven't tried.


----------



## Blade Hunter

I learned by simply recording actions and then looking at what it was doing. You can soon work out what bits are redundant and can be removed, from there you will be able to work out that you no longer need to select cells to manipulate them.

After that you will be hungry for more, places like here are great, grab other peoples code snippets and pull it apart, get your hands dirty .


----------



## MorganO

I greatly enhanced my VBA skill by finding unanswered posts in the Excel questions  Forum on this board.  Even though, as said above, others might answer before you have a solution, keep at it.   <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
My experience working with others on the board was that my solutions were often easier for the other beginners to understand because I only understood the simplest concepts in VBA, and I would brute force everything to work.  But I learned the simpler, more efficient methods by tearing apart the code written by the board experts - it gave me something to compare my methods to, ultimately making me a better coder.<o></o>
<o> </o>
Take care,<o></o>
<o> </o>
Owen<o></o>


----------



## Sri Rahm

A great tool is to have the code window open on the side with the main Excel window also showing.  Then, as you step throught the code you can "watch" what happens with each line executing.

Another great way is to record a macrto and then go and examine the code that the recorder generated.  It is not always the most effcient code but a great way to learn the syntax.


----------



## excelslife

hey how is your vba learning .. i am new to vba , can you provide some suggestion..


----------

