Progress Bar While Macro Is Running?

Mar 10, 2014

I have a macro that takes about a minute to run. I would like to add a progress bar to appear once the macro starts running. There are no loops in the macro. What are my options?

View 3 Replies


Progress Bar To Work While Running The Macro

Jul 6, 2005

I was looking at a previous post to get a progress bar to work while running
a lengthy macro. Below is the post on how to incorporate the progress bar
into your code.

That works fine expect for one thing. There is a cancel button on the progress bar, and when it is pushed the rest of my code continues running. How do I end my code if I press cancel on the progress bar?

Sub Main
Dim PB as clsProgBar
Set PB = new clsProgBar

'if your subs are being called from a userform, hide the form first using
With PB

.title = "some title"
.caption1 = "Executing, this may take a while"
.caption2 = "Doing task 1"

View 14 Replies View Related

Progress Bar: Use A Msgbox As A Progress Indicator For A Routine In An Application

Mar 16, 2009

I want to use a msgbox as a progress indicator for a routine in an application. I cant figure out how to do this.

View 5 Replies View Related

Macro Progress Bar For Macro Taking Long Time

Dec 2, 2008

I have a macro that is taking a long time, so long that I think something is wrong but I dont really have a great way to check. I want to put up a little window showing the progress either by saying "i'm on row XX" or having a progress bar.

Looks like msgbox requires action before the code continues so it is not a good thing to use if you want to get progress. My formula looks for bad values in a data file and fixed them. It takes forever. I would like to have a box there that simply tells me what row it is working on.

Clearly I dont want to hit the OK button for it to continue processing. I want it to update the message box on its own and then take away the message box when it is finished processing.

View 8 Replies View Related

Set The Progress Bar Which Should Indicate The Progress Of The Data Loading?

Mar 28, 2014

Im consolidating datas from muliple excel files to single data base excel file.Am having macro and it is working fine for me.But when am loading data to data base file the excel files are vibrating.To avoid this issue i want to Set the progress bar which should indicate the progress of the data loading.

View 12 Replies View Related

Progress Bar Macro

Jul 1, 2007

I'm using a mostly recorded macro to do some rather lengthy formatting in a workbook. The formatting is lengthy enough that I don't want people to think the PC is hung. So I'd like to use the progress bar. I'm trying to trim the code down to just the bare essentials for running the progress bar during the macro procedure (and so I can better understand what's happening in the code). The attachment shows what I've done so far. When I press the "Format Workbook" button then I have to press another button ("Run Progress Meter") to really launch the progress bar.

View 5 Replies View Related

Display Progress Of Macro

Aug 28, 2007

I have a macro that runs when the file is opened and takes some time. I turn off the screen updating to speed the process. I want a msgbox, or something, to tell users that file is processing information that does not require a response to continue the code.

View 8 Replies View Related

Progress Bar For Macro Code

Apr 1, 2008

I am getting compile error for following code saying sub or function not defined with updateProgress getting highlighted

UserForm2.LabelProgress.Width = 0
UserForm2.Show vbModeless

MsgBox "get_blades (lookinname)"
UpdateProgress 0.25 ' 25%

MsgBox "sort_data"
UpdateProgress 0.5 ' 50%

MsgBox "Get_Nom"
UpdateProgress 0.75 ' 75%

MsgBox "get_info"
UpdateProgress 1 ' 100%


Unload UserForm2

View 2 Replies View Related

Progress Bar For Non-Looping Macro

Aug 12, 2008

I'm running a simulation that utilizes the Data Table function. The table itself is quite large (280 elements in the row, 10K in the column). It currently takes about an hour to run. (Full disclosure: I did this instead of a couple of "for" loops because I have to consolidate/manipulate a bunch of data from several sheets and it seemed to be running slower than a data table). how to write a progress bar for this type of code? I.e. code that does not loop and is just time-consuming?

View 4 Replies View Related

Macro Progress Bar To Show % Process Done

Oct 25, 2008

As i have a pretty "complex" macro, which takes around 20-30 minutes to do (honestly)....

I was wondering if there was a way to create a progress bar just showing me how many % it has done so for?

Or even tell me which sub routine it is up to? (but % would probably be better)

And preferably a pop-up box one?.. not one on the status bar because i have stuff updated on the status bar already...

View 14 Replies View Related

Diplay Progress Of Slow Macro

Jan 14, 2008

I'm running some macros that take a bit of time (1000-2000ms), and would like to give the user some feedback as to what's happening.... Ideally, I'd like to show a msgbox-like pop-up window saying something "processing..." while the macro executes.

I have tried using userforms (based on this post Excel VBA Macro- How to Create a Splash Screen for your Excel Workbook); however they halt background execution...

Is there any built-in functionality similar to .statusbar, but more obvious/visual that would allow this? I'm about to experiment with showing/hiding a textbox shape, but this seems a bit sloppy...

View 2 Replies View Related

Macro For Progress Bar In Status Bar As A Percent Of Time

Jun 26, 2014

I have been looking for a macro (and have failed to find one) that would give a progress bar in status bar as a percent of the macro run time, e.g

If I had a macro that took say 5 minutes (which I would know in advance) to run is there a way to have a progress bar in status bar that would progress incrementally as a percentage of the 5 minutes or even simpler break the 5 minutes into 1 minute increments?

View 2 Replies View Related

Display Progress Of Macro Procedure & Interrupt Code

Feb 26, 2008

I have a program that screen scrapes data fom a mainframe emulation program. There are many loops used in order to slow the program down checking for things to load before taking the information. I would like to build some kind of display showing the user what the program is doing and allow them to stop the program if they like. Right now while the program is running everything is frozen and unresponsive.

View 3 Replies View Related

Show Progress Indicator If Macro Execution Take Some Considerable Time

Jun 7, 2007

is it possible to show progress indicator if macro execution take some considerable time say more than 10 seconds?

View 2 Replies View Related

Macro Stops Running The Macro Completely And Hangs In The Middle

Jul 3, 2007

Here in our department we made a pretty elaborate macro that takes a report and sorts them out to 17 different sheets in a one workbook. This Macro pulls a file from a specific location on our server and then opens the CSV sorts it out color codes all the important information and saves it back onto the server under you specific initials.

They are four PC's along with our Managers laptop that run this Macro daily.

About 3 weeks ago my Managers laptop stops running the Macro completely and hangs in the middle of the whole thing. Eventually crashing Excel.

We try to remove the modules and re-import them back into the personal macro workbork but this does not work. The Macro's did not change and still fully function on the other four desktops to this day.

I uninstall Office on my Managers laptop and reinstall. Import the Modules again and still hangs up in very same spot it did 3 weeks ago.

I've tried to lower the macro security to the lowest level also and I've still had no luck with this laptop. I don't understand. The Macro's function perfectly on other PC's but will not function on this laptop.

View 9 Replies View Related

Running A Macro When A Value Is Reached In A Specific Cell Used To Call Up Macro

Jan 7, 2009

I have a Sheet sheet1 and I want to run a macro when the cell D2 in Sheet1 is equal to 10,7,5,and 3. I only want this macro to run when those values are reached the macro then puts the data onto a sheet called wps. The macro is run as a module and is a sub macro.

View 9 Replies View Related

Running A Macro

Dec 19, 2006

Can i run a macro by just the pointer going over it.

View 9 Replies View Related

Running A Macro On Save?

Apr 10, 2014

I'm trying to get a macro to run when the user presses the save button. I have the following code:

[Code] .......

This code is supposed to apply the TRIM function to every worksheet in the workbook when the user presses save, and the saves the results. I understand the Private Sub bit is the code to have the macro run during the save, but for some reason the macro itself isn't actually running. I'm not getting any error message, its just that the cells which should have the TRIM function applied to them aren't being corrected.

View 4 Replies View Related

Running Private Sub From A Macro

Mar 17, 2014

I have 3 different sheets with a private sub on each all labelled

Private Sub CommandButton1_Click()

The macro's runs fine on each page.

I want to put a macro on a separate sheet that i can run each of those macro's

I did initially copy the original private macro and change the

Private Sub CommandButton1_Click()


sub report()

But I couldn't do all 3 in the same manner. i did change each name to something different... the other 2 subs did run, but they didn't do anything except put the massage box on the end saying that "the macro has finished".

The private macros are on sheets 26, 28 and 12.

View 3 Replies View Related

Running Macro In Different Workbooks

Mar 25, 2014

I have 7 different workbooks as part of my daily routine.

At present the first workbook is opened via the task scheduler, and the macro is run using the following code

[Code] .....

This then opens the next workbook and closes the current one. The next workbook then runs its macro again from a timed call

[Code] ...........

This repeats for 7 workbooks. The problem is, if a macro overruns - the whole schedule is out of sync when macro's are called depending on the time. What I would like to do, is link each macro by calling for the next one, and closing the current workbook. However, when i have tried to do this, the macro has always stopped when the workbook has been closed - the next macro doesn't run.

View 2 Replies View Related

Slow Running Macro

Oct 3, 2007

Below is the entire code that I am using. It is a simple routine which checks whether a part has started its release process or not, based upon dates. The code works and does what I want.

The problem that I have is that it is very slow, for example it takes 35 seconds to go through 530 lines items. In my (limeted) experiance, based on other VBA doodlings this slow.

View 9 Replies View Related

Running A Macro From A If Statement

Jul 28, 2008

Is it possible to run a macro from an IF command?

View 9 Replies View Related

Running Macro Every 20mins.

Oct 8, 2008

I already have a macro made named (PowerPoint) that is saved to the wookbook. I am looking for a way to have this run every 20min. I have tried several differnt things and it did not work. Here is one I found online. I only need it to run when it is open and every 20mins. as long as I have it open.

View 3 Replies View Related

Running A Macro From A Different Workbook

Dec 18, 2008

I have 2 workbooks (Workbook1 and Workbook2).

Workbook 1 contains a button, that calls a macro. This macro calls a macro from Workbook 2.

For this, I am using the Application.Run function.

The Macro in Workbook2 is a simple one line macro that updates cell A2 to a value of 6.

Range("A2").Value = 6

This works fine!

However, I want the the cell A2 in WORKBOOK1 to change to 6, not the cell in Workbook 2.

To add an element of difficulty, Workbook 1 could have any name (I won't know what it is, as the user could change it).

How can I get the Macro in Workbook 2 (Called from Workbook1), to update the cells in Workbook 1.

View 12 Replies View Related

Macro For Running Solver ...

Jan 11, 2009

I have a problem with a macro in Excel 2007. It invokes
solver and creates an answer report. Please find the VB
code for macro, below.

View 7 Replies View Related

Confirmation Box Before Running A Macro

Apr 8, 2009

How do I ask for a confirmation box before running a macro, but only one time. What I mean is some of the macros I use loop and it wouldn't be practical to click on "ok" for each time the macro ran.

So again I just need some code to tack on to the beginning of a couple of my macros that will ask me before they run but only once.

View 11 Replies View Related

Macro Running Very Slow

Jun 11, 2009

I have the following macro in a worksheet...and it is running very slow. There are other macros in the worksheet and they all run very well. Any ideas by looking at this code why it would be so slow in running?

View 7 Replies View Related

Macro To Stop Running At Last Row

Aug 10, 2009

I have a spreadsheet containing a macro to automatically sum values from week to week and display the max/min and average. This is almost fully working. The problem I have is the macro copies the sum formula down the page and doesn't stop at the last row. It always adds one or two extra rows. The formula should stop at row 77 however this does not happen and therefore the sum keeps going. Which in turn, distorts the max/min figures.

View 2 Replies View Related

Running Macro In Another Workbook

Sep 17, 2009

I have 2 files in a folder, "Main.xls" and "My Database.xls". "My Database.xls" contains the following macro in 'Module1':

View 2 Replies View Related

Running Macro From A Cell

Jul 23, 2014

I am trying to utilise a vba script for DNS resolution which i got from Followup: DNS Lookup and Ping in Excel - CodeProject

I have a list of IP addresses that I want to use this on, however if I test this by using the test instructions, excel does nothing, its just text in a cell, so I would like to know how would this procedure get called from the spreadsheet?


GetHostname("") in any Excel cell.


Use: GetIpAddress("") in any Excel cell.

View 3 Replies View Related

Copyrights 2005-15, All rights reserved