Excel Macros - part of it not recording?

I am new to Excel Macros, but I think I understand how they work. In short, it appears that, when I run the Macro, part of it works, but part of it doesn't.

I go in and start recording the new macro, then I go through the steps, then I stop recording. When I run the macro, it does most of my steps, but not all of them.

I can send the Excel file on request, but let me tell you how it's set up.

I have a template where I record all the food I eat. I have summary pages in the beginning sheets and a sheet for each day of the week. I made the macro to clear out the food template at the end of the week so I can start a new file for the next week. When I run the macro, it tends to clear out the Monday through Saturday worksheets, but not the Sunday worksheet.

I have done this process over and over again to make sure I am getting all the steps in the clearing of the macro, but it doesn't seem to be working. Sometimes, instead of clearing the Sunday sheet, it goes and clears the sheet right before it. I then wrote a second separate macro to clear out the Sunday sheet, but it did not.

Do I have some kind of protection turned on in the Sunday sheet that I don't know about?

I am new to macros and these were my first two macros.

Visual Basic Editor

 Hi,
It sounds like a perfect time to open up the Visual Basic Editor.  With the Visual Basic Editor (VBE), you can see each line of macro code, and see what is and is not happening.  Then, since the VBE is like a word processor, you can type in the fixes, copy/paste, etc, in order to get the macro dialed in and working perfectly.

Most macros need little tweaks to get them dialed in just right.

Opening the Visual Basic Editor from Excel 2003: Tools > Macros > Visual Basic Editor.  In Excel 2007, you must first turn on the Developer tab, by checking the "Show developer tab in ribbon" checkbox inside of the Excel Options.  Then, once the developer tab is enabled, you can open the VBE by clicking the Visual Basic button.

Well, good luck, and I have found that it is generally well worth the time invested to get your macros perfect due to the amount of time they can save you.

Thanks!

 Thank you Jeff. I will try it out. I'm really new to macros, so it's good to know that they sometimes have kinks in them to be worked out.

 

You guys at Click Consulting are geniuses!

 

Ann

Excel Macros - part of it not recording?