Hello Roy. I am facing some issues. As you suggested, I have removed unprotection from the sheets.

    When I run the first Macro Button it unhides the sheets but at the end of the code I need to hide the sheets again. In the code of the first macro, I have added a line below Sub() to unhide the sheets and at the end of the macro I have added another line to hide the sheets before End Sub. The error highlights the "Hidesheets." and displays - compile error Expected variable or procedure, not module.

    Hello experts

    I need your expertise to find the fault in the code and solution to correct this. I have this workbook where the data is pasted in one sheet ”Original” from column A to J whose cells are not locked and not hidden. The rest of the sheet is protected with a password and the cells are hidden and locked. The macro button is in column K. Other than this sheet there are several other sheets which are protected and hidden. When I run the code, the code should unprotect and unhide all the protected and hidden sheets in the workbook. When the macro ends, I want the code to again protect and hide all the other sheets which were already hidden. The columns A:J in Original sheet must stay unlocked and unhidden at all times.

    Thank you so much Mumps. That was very kind of you. There is no end to learning in excel especially. So, whatever is related to accounts, I really try and learn the formulas and codes connected to it. Your words are encouraging and I need that inspiration. Thank you once again.

    Mumps. Your code was right. Instead of button I changed it to the name of the button. That is why it was not accepting. So I recorded a macro and tried it your way and found it working. Thanks a lot. The problem now is solved.

    {ActiveSheet.Shapes.Range(Array("Button 3")).Select

    ActiveSheet.Shapes("Button 3").ZOrder msoSendBackward


    ActiveSheet.Shapes.Range(Array("Button 5")).Select

    ActiveSheet.Shapes("Button 5").ZOrder msoSendBackward


    I will share it sometime. Please don't laugh at my codes and presentation. I am a beginner and try all sorts of different things. Please note the code is running perfectly. Only thing is to display one button only at a time. Each code takes more than 2 minutes to run in my system. If done in the server it may take at least 1/2 hour to run.

    Royuk. I have already mentioned in my first message that it was shared in other forum where I was not able to get a solution. If you mean by sharing the same query, I always try to explain my problem as simple as possible. Regarding my query, it is not the code, which is a dummy in this case, it was about how to place the buttons on top of each other and when pressed, the pressed button goes below and the next step button comes on the top. If you had read the first post then you would have understood what I am trying to do. About your code, I can’t see the solution to my query. Sorry, if I have broken any rules.

    There are 9 sheets with different names used in the code. The sheet Original is the only sheet where the data is entered and the buttons are created. The code is running perfectly when I run the buttons inidvidually. Like I said earlier, When working on a new data, if the user presses the GenerateXML button before ClearData button the code will generate an error because the old data is not cleared.