Excel VBA Edit and Test a Macro

writeicon In the Excel VBA Edit a Recorded Macro article, you saw the steps for making changes to an Excel macro that you had recorded.

Excel VBA code edited

I’ve uploaded a new video that shows the steps for editing the Excel macro, and stepping through the macro code by using the F8 key.

____________

You may also like...

2 Responses

  1. dermotb says:

    Debra,

    one suggestion I’d make, even for beginners, is never to hard code things in the black box called VBA.

    I’d
    1. put the workbook name in an input cell on a worksheet and give it a range name

    2. give a range name to the filter cell range as well, and do it in a way that it always picks up all the data, eg perhaps you only name the top left cell, and VBA figures out the row and column count, or maybe you just make the range big to start with

    3. use the names in code

    then any changes can be made in the worksheet, which is infinitely more accessible to most users, because for every person who is able to tinker with VBA, 1000 cannot.

  2. Thanks dermotb, excellent suggestions, and that’s how I set up workbooks for my clients, so they’re easy to maintain.

    I’ll be building on this example in the upcoming weeks, and show how to improve it.

Leave a Reply to Debra Dalgleish Cancel reply

Your email address will not be published. Required fields are marked *