Status Bar

  • Hi All,


    I have VBA which extracts data from specific folder which has 20 workbooks, opening them in background and displays "Running macro..." in status bar, I would like to know at what file its up to Or is there any way to show file name or sheet name with "Running macro...." and how much % to finish this macro in status bar?

  • Re: Status Bar


    Hi and welcome to the firum.


    You could amend something like this to suit your purposes.


  • Re: Status Bar


    Thanks Richie,


    It is calculating % at the beginning, then runs my other macros by showing just "Running Macro..." in status bar.

  • Re: Status Bar


    This is just one vba code, I have 6 more vba in this workbook:


  • Re: Status Bar


    Here is another one which says "Running Macro..." in the status bar.

  • Re: Status Bar


    I think this will do what you want



  • Re: Status Bar


    Thank You Mr. Roy & sorry for late reply.


    It doesn't change from "Running Macro..." to "Processing " & ws.name. Secondly its running very slow and thirdly it stops at .Calculation = glb_origCalculationMode


    I need to know what file (slaveWB) its running not the ws.name, so I changed it to "Processing " & slaveWB.Name, but no result...


    Please help.

  • Re: Status Bar


    Maybe



  • Re: Status Bar


    Thank You Mr. Roy & sorry for late reply.


    It doesn't change from "Running Macro..." to "Processing " & ws.name. Secondly its running very slow and thirdly it stops at .Calculation = glb_origCalculationMode


    Please help.

  • Re: Status Bar


    Roy,


    Still the same. It doesn't change from Running Macro to Processing. Eventually it comes out with the result but pops up error 1004 for .Calculation = glb_origCalculationMode and pointer shows busy.


  • Re: Status Bar


    Wow Richie,


    It worked, it started showing file names at the status bar with "Processing....", but I feel its bit late somewhat two files to display its name.


    Secondly as I mentioned earlier at the end it pops up error 1004 for .Calculation = glb_origCalculationMode and pointer shows busy.


    Thirdly I would like to show percentage of complete too.


    Please help....


  • Re: Status Bar


    Where is the variable glb_origCalculationMode declared? How/when is it given a value?


    If you want a percentage figure you will need to know how many files are being processed. I assume that you have a function called GetFileList that is used to populate the fileList Variant variable. Have a look at the Ubound property and use that in combination with my original post (#2) to see if you can figure it out.

  • Re: Status Bar


    Richie thanks for your response, but I am not VBA expert, I am just a beginner.


    glb_origCalculationMode is solved, I started with Open Explcit.


    Now my concern is why it displays filename bit late?


    I have 20 files in that slave folder where GetFileList function is called, but their property differs, some workbook has 10 worksheet and some 20 worksheet.


    Could you please response with the code?

  • Re: Status Bar


    Hi All,


    I got this link which would work great, but now I don't know how to consolidate with below code:


    Please help

  • Re: Status Bar


    Quote from Shums;620117

    Richie thanks for your response, but I am not VBA expert, I am just a beginner. ...


    In that case I would offer two bits of advice (just my opinion - you may see it differently):
    1. Don't blindly copy bits of code from multiple sources and then put it all together and expect it to work. Try to understand how the code works and how it can be used to achieve your objective.
    2. If you want to progress from being a beginner you need to try to improve. It doesn't matter if you don't get it right first time - we often learn by our mistakes - but if somebody points you in the right direction you should at least give it a go.

  • Re: Status Bar


    Sorry Richie,


    If any of my reply offended you. I am trying to understand logically how the code works, but I am not aware of exact Excel terminology to incorporate with existing code. If I would be able to write VBA code, I would have not posted my query here. And I am sure, many members here posting their query or asking experts their advice are not aware of VBA coding.


    Thanks for your advice, I will take care next time.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!