ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I don't want to see scroling which VBA does, adding a progress bar (https://www.excelbanter.com/excel-programming/349663-i-dont-want-see-scroling-vba-does-adding-progress-bar.html)

marko

I don't want to see scroling which VBA does, adding a progress bar
 
Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't want
to see that, I just want VBA to preform my task and I want the screen to be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco



Hemanth[_2_]

I don't want to see scroling which VBA does, adding a progress bar
 
Set Application.ScreenUpdating == False at beginning of code and
set it back to True at the end.

I think, excel status bar (at the bottom of the excel workbook) shows a
progress bar when excel is busy but I'm not sure how to create our own.

- Hemanth

marko wrote:
Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't want
to see that, I just want VBA to preform my task and I want the screen to be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco



Hemanth[_2_]

I don't want to see scroling which VBA does, adding a progress bar
 
Set Application.ScreenUpdating == False at beginning of code and
set it back to True at the end.

I think, excel status bar (at the bottom of the excel workbook) shows a
progress bar when excel is busy but I'm not sure how to create our own.

- Hemanth

marko wrote:
Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't want
to see that, I just want VBA to preform my task and I want the screen to be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco



Edward Ulle

I don't want to see scroling which VBA does, adding a progress bar
 
Marko,

Regarding question 1:

Application.ScreenUpdating = False ' turn off updating

Application.ScreenUpdating = True ' turns it back on

Regarding question 2:

See the ProgressBar control. You may have to add it to your controls
toolbar. "Microsoft ProgressBar Control 6.0".

The progress bar maximum is an integer value so you may have to wrap the
update function to handle long values.




*** Sent via Developersdex http://www.developersdex.com ***

Jim Thomlinson[_5_]

I don't want to see scroling which VBA does, adding a progress bar
 
sub whatever()
on error goto errorhandler
application.screenupdating = false
'your code here
ErrorHandler:
application.screenupdating = true
end sub
--
HTH...

Jim Thomlinson


"marko" wrote:

Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't want
to see that, I just want VBA to preform my task and I want the screen to be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco




John Skewes

I don't want to see scroling which VBA does, adding a progress bar
 
Hi marko,

Just put Application.ScreenUpdating = False near the start of your code and
Application.ScreenUpdating = True as the penultimate line to stop you seeing
what's going on. This will stop the screen being continually repainted and
speed up your code quite a bit - so much you will probably find you don't
even need a progress bar...

HTH,
John
--
The major part of getting the right answer lies in asking the right
question...


"marko" wrote:

Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't want
to see that, I just want VBA to preform my task and I want the screen to be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco




marko

I don't want to see scroling which VBA does, adding a progress bar
 
Thanks!!!
Now it takes 2 secs not 20 like before!!! I don't need the progress bar now
Thanks!!!

Marko

"John Skewes" wrote in message
...
Hi marko,

Just put Application.ScreenUpdating = False near the start of your code
and
Application.ScreenUpdating = True as the penultimate line to stop you
seeing
what's going on. This will stop the screen being continually repainted and
speed up your code quite a bit - so much you will probably find you don't
even need a progress bar...

HTH,
John
--
The major part of getting the right answer lies in asking the right
question...


"marko" wrote:

Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't
want
to see that, I just want VBA to preform my task and I want the screen to
be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco






marko

I don't want to see scroling which VBA does, adding a progress bar
 
Thanks!!!
So many replys from you guys!!! Thaks to all!!!
Marko

"Edward Ulle" wrote in message
...
Marko,

Regarding question 1:

Application.ScreenUpdating = False ' turn off updating

Application.ScreenUpdating = True ' turns it back on

Regarding question 2:

See the ProgressBar control. You may have to add it to your controls
toolbar. "Microsoft ProgressBar Control 6.0".

The progress bar maximum is an integer value so you may have to wrap the
update function to handle long values.




*** Sent via Developersdex http://www.developersdex.com ***




marko

I don't want to see scroling which VBA does, adding a progress bar
 
Thanks!!!
Now it takes 2 secs not 20 like before!!! I don't need the progress bar now
Thanks!!!

Marko

"Hemanth" wrote in message
oups.com...
Set Application.ScreenUpdating == False at beginning of code and
set it back to True at the end.

I think, excel status bar (at the bottom of the excel workbook) shows a
progress bar when excel is busy but I'm not sure how to create our own.

- Hemanth

marko wrote:
Hi!
I made some VBA code which takes about 20 seconds to finish and the
selection goes from one row to another and i can see all that. I don't
want
to see that, I just want VBA to preform my task and I want the screen to
be
still all the time.
And is there a way to add a progress bar so i know when it's finished and
how long will it aproximattly take to finish?
Thanks!

Marko Svaco






All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com