Just want to share this with you.. this video and your last video (3 tips to faster macros) inspired me to go back through some of my workbooks with macros that run very slowly. To one case in particular, I added a timer with MsgBox (per your example) and timed the macro. It took about 60 seconds to run. I modified the code with some of your tips and got it down to about 30 seconds which was very much better, but still too slow. Then, I dissected my old code and changed the logic entirely and now the macro completes the very same procedure in about 0.5 seconds. So, that is a factor difference of 120 or 12000% between 0.5 seconds and 60 seconds. I can't thank you enough for both the inspiration and the information that helped me make this dramatic improvement. It goes to show that no matter what you think you know, you can always learn something new. Many thanks for all your videos and sharing of knowledge.. much appreciated :)) Thumbs up!!
@IvanCortinas_ES3 жыл бұрын
Excellent tutorial with the TIMER function. Thank you very much!
@TeachExcel3 жыл бұрын
Thank you Ivan! I'm glad you think so :))
@NeangBona3 жыл бұрын
really amazing magic VBA macro timer I like it !
@TeachExcel3 жыл бұрын
Thanks Neang!! I'm really glad you like it :)
@wayneedmondson10653 жыл бұрын
Thanks for this.. super useful tip! Thumbs up!!
@TeachExcel3 жыл бұрын
Thanks Wayne! :)
@darrylmorgan3 жыл бұрын
Cool Tutorial,Great Way To Test And Build Fast Efficient Code...Thank You Sir :)
@TeachExcel3 жыл бұрын
Thanks Darryl! Timing is definitely something everyone should add to their testing kit.
@chrisk.97653 жыл бұрын
Nice, how to clean Immediate window with VBA code ?
@TeachExcel3 жыл бұрын
You can apparently do it using SendKeys but it is not something that I necessarily recommend. The logging feature of it allows you to nicely compare previous results and it clears itself when you close Excel. You can clear it on your own by hitting Ctrl + A to select All and then the Delete key. Or, you could try something like this with vba, basically just the keyboard shortcuts programmed-in. Application.SendKeys "^g ^a {DEL}" This might not be that reliable though - untested by me.
@chrisk.97653 жыл бұрын
@@TeachExcel Thx for response, I've tested it already but it's let's say 'imperfect'.
@CaseyLynn19633 жыл бұрын
I really like this ... but the view immediate button is grey out and am not able to see results of the time