+ Reply to Thread
Results 1 to 9 of 9

how do you set up a progress bar when running a macro in excel?

  1. #1
    Neil Hopkinson
    Guest

    how do you set up a progress bar when running a macro in excel?

    I have written a macro which takes a minute or so to run. I want to set up a
    progress bar so the user can see something happening and knows the program
    hasn't crashed. How do I do this?

  2. #2
    John Keith
    Guest

    RE: how do you set up a progress bar when running a macro in excel?

    I was about to ask almost the same question (and this was the top post)

    I want to display some type of message as the macro starts... then when its
    done, have the message go away. something like "Please wait, Macro running".

    The progress indicator would be nice to have as well...


    "Neil Hopkinson" wrote:

    > I have written a macro which takes a minute or so to run. I want to set up a
    > progress bar so the user can see something happening and knows the program
    > hasn't crashed. How do I do this?


  3. #3
    Don Guillett
    Guest

    Re: how do you set up a progress bar when running a macro in excel?

    statusbar="running"
    code
    statusbar=""

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Neil Hopkinson" <Neil [email protected]> wrote in message
    news:[email protected]...
    > I have written a macro which takes a minute or so to run. I want to set up

    a
    > progress bar so the user can see something happening and knows the program
    > hasn't crashed. How do I do this?




  4. #4
    Tushar Mehta
    Guest

    Re: how do you set up a progress bar when running a macro in excel?

    For a few different options see
    http://www.mrexcel.com/board2/viewto...?p=88129#88129

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>, "=?
    Utf-8?B?TmVpbCBIb3BraW5zb24=?=" <Neil
    [email protected]> says...
    > I have written a macro which takes a minute or so to run. I want to set up a
    > progress bar so the user can see something happening and knows the program
    > hasn't crashed. How do I do this?
    >


  5. #5
    Mike Fogleman
    Guest

    Re: how do you set up a progress bar when running a macro in excel?

    Not Everyone may have the status bar visible, so you might want to try
    putting some text in a cell and then removing it -
    Sheet1.Range("A2").Value = "Calculating...."
    Application.ScreenUpdating = False
    Some code
    Sheet1.Range("A2").Value = ""
    Application.ScreenUpdating = True

    Mike F
    "Don Guillett" <[email protected]> wrote in message
    news:[email protected]...
    > statusbar="running"
    > code
    > statusbar=""
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "Neil Hopkinson" <Neil [email protected]> wrote in
    > message
    > news:[email protected]...
    >> I have written a macro which takes a minute or so to run. I want to set
    >> up

    > a
    >> progress bar so the user can see something happening and knows the
    >> program
    >> hasn't crashed. How do I do this?

    >
    >




  6. #6
    Tushar Mehta
    Guest

    Re: how do you set up a progress bar when running a macro in excel?

    A lot safer than changing a cell's content would be to show the status
    bar if appropriate.

    Changing a cell requires (at a minimum) the following assumptions:

    The cell is in the visible portion of a window.

    That portion of the window is not obscured by another window

    The cell is empty

    Changing that cell will not trigger any other cascading changes

    Changing the workbook's status to 'dirty' is acceptable

    Neither the cell's row and column is hidden.

    The cell's height and width are sufficiently large to show the progress
    status

    The cell's format (font size, color, pattern color, etc.) allow for a
    visible progress status.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    > Not Everyone may have the status bar visible, so you might want to try
    > putting some text in a cell and then removing it -
    > Sheet1.Range("A2").Value = "Calculating...."
    > Application.ScreenUpdating = False
    > Some code
    > Sheet1.Range("A2").Value = ""
    > Application.ScreenUpdating = True
    >
    > Mike F
    > "Don Guillett" <[email protected]> wrote in message
    > news:[email protected]...
    > > statusbar="running"
    > > code
    > > statusbar=""
    > >
    > > --
    > > Don Guillett
    > > SalesAid Software
    > > [email protected]
    > > "Neil Hopkinson" <Neil [email protected]> wrote in
    > > message
    > > news:[email protected]...
    > >> I have written a macro which takes a minute or so to run. I want to set
    > >> up

    > > a
    > >> progress bar so the user can see something happening and knows the
    > >> program
    > >> hasn't crashed. How do I do this?

    > >
    > >

    >
    >
    >


  7. #7
    Paul
    Guest

    Re: how do you set up a progress bar when running a macro in excel?

    Hi Neil,

    a few more site that might be helpfull:
    http://j-walk.com/ss/excel/tips/tip34.htm
    http://www.*****-blog.com/archives/2.../progress-bar/

    a nice example:
    http://www.oaltd.co.uk/DLCount/DLCou...e=WksPrgrs.zip

    hope u can use this!!

    "Neil Hopkinson" <Neil [email protected]> wrote in message
    news:[email protected]...
    >I have written a macro which takes a minute or so to run. I want to set up
    >a
    > progress bar so the user can see something happening and knows the program
    > hasn't crashed. How do I do this?




  8. #8
    Neil Hopkinson
    Guest

    Re: how do you set up a progress bar when running a macro in excel

    Thankyou to everyone for your help. Much Appreciated


  9. #9
    Fredrik Wahlgren
    Guest

    Re: how do you set up a progress bar when running a macro in excel?


    "Neil Hopkinson" <Neil [email protected]> wrote in message
    news:[email protected]...
    > I have written a macro which takes a minute or so to run. I want to set up

    a
    > progress bar so the user can see something happening and knows the program
    > hasn't crashed. How do I do this?


    You have to use the CreateWindowEx API function if you want to create a real
    progress bar. Here's an article that may already have been submitted
    http://www.*****-blog.com/archives/2.../progress-bar/

    /Fredrik



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1