How to Use Excel VBA Code - Real Example P8

Published: 02 August 2019
on channel: Tiger Spreadsheet Solutions
1,740
28

How can we use Excel VBA code to speed up manual work in Excel? In this series we explore an example Excel VBA project sent in by Eric, a viewer of the channel. We aim to build an Excel VBA application to move data around a file at the 'click-of-a-button', saving hours of frustrating manual work. The application should be flexible and scaleable enough to handle changes in business circumstances - a challenge indeed! Let's get into it...

Download File Link:
https://tinyurl.com/y4d6ds62
----------------------------------------------------------------
Part 8 - Excel development has … a *rhythm*?

Yes that’s right – Excel VBA development has a rhythm and, by understanding its rhythm, we can improve our coding practice. At the beginning of the video, Chris argues that progress through any computer-related task is not ‘linear’; in other words, rather than by incremental units of work, an Excel VBA task is characterized by periods of conceptualization, planning or tidying up, interspersed with periods of heavy coding and rapid development. These different phases that demand different skills and mindsets make up the ‘rhythm’ of Excel VBA development.

We did a fair amount of coding in the previous video. So, now is a good time to step back, take stock and do some tidying up. We can think of the VBA editor as our ‘workspace’, like a potter’s wheel, carpenter’s workbench or seamstress’s sewing machine (yes, Chris thinks of computer programming as a ‘craft’, like the above). An untidy workspace means a muddled mind and more frustration, just as a tidy one can inspire creativity. So, how can we tidy up the workspace, in our case, the VBA editor?

First, we call on a technique that helped us earlier in the series. With … end with allows us to simplify code by minimizing text; this helps our mental processing – and the computer’s! Yes, code tidied up in this way is not only easier to read, it also runs faster. Cool! We look at two opportunities to apply with … end with, integrate the syntax, and do the testing.

With the simplification done, what else can we do to tidy up? After the speedy development of the last video, we need to catch up on annotations. These in-code comments help us understand, in English, exactly what is going on. Chris goes through the code line-by-line and describes what each is doing in layman’s terms. The result: a ‘commentary’ of what the code is doing. This might help your colleague or your client understand what is going on; as Chris explains, it also helps us when we come back to the code after some time away from it. Consider these annotations essential for stress-free coding.

Don't forget to leave Chris a comment - help will get back to you. See you in the next video!

Series Playlist Link:
https://tinyurl.com/y4pmrkxn

🎁YOUR EXCEL CHEATSHEET
🎁1 Page Summary Of What You Need To Know
https://tinyurl.com/yc7jlmbs

  / tigerspreadsheetsolutions  
  / tigspreadsheets  
http://tigerspreadsheetsolutions.co.uk
Also on Insta :-)


Watch video How to Use Excel VBA Code - Real Example P8 online without registration, duration hours minute second in high quality. This video was added by user Tiger Spreadsheet Solutions 02 August 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,740 once and liked it 28 people.