Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Display one sheet or two userforms while code is vba code is runningon another

I have VBA code that freezes and unfreezes windows on a worksheet
while it searches for the best presentation. Although it only takes
10 seconds or less to execute, this is annoying to watch, and I do not
know how to prevent it from displaying.

If I use application.screen update = false then the windows do not
freeze or I get an error. The same thing happens if I minimize the
worksheet. The same with the events = false application.

Tthis sequence of events is occuring as a part of a larger sequence of
operations, the total taking about 1-2 minutes to run at the most
depending on processor speeds. While the sequences run, I am
displaying a userform with a progress bar. The progress bar is small
and centered on the screen.

I am considering either displaying a blank worksheet behind the
userform progress bar while the code runs, making changes on a
different worksheet, or perhaps if necessary, display a 2nd userform -
a large blank one - behind the userfform with the progress bar. Is
either of those options possible? I do not know. If I cannot find a
better solution, I could make the progress bar userform larger - is
that the most practical approach?

I appreciate any advice.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Display one sheet or two userforms while code is vba code is runningon another


The best approach is not to use Select or Activate in your code so you
don't get the page swapping. The worksheet will remain on the sheet
that is selected when the macro is started. Also you wuold be able to
manually switch pages while the macro is running and watch the progress
of the macro without causing errors in the macro. the best practice is
not to use ActiveSheet or Active cell in you macro instead directly
refer to the cells.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=165330

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Display one sheet or two userforms while code is vba code isrunningon another

On Dec 28, 5:30*am, joel wrote:
The best approach is not to use Select or Activate in your code so you
don't get the page swapping. *The worksheet will remain on the sheet
that is selected when the macro is started. *Also you wuold be able to
manually switch pages while the macro is running and watch the progress
of the macro without causing errors in the macro. *the best practice is
not to use ActiveSheet or Active cell in you macro instead directly
refer to the cells.

--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=165330

Microsoft Office Help


Thank you for the advice. I had been using a lot of activate
statements. I will give it a try. I appreciate it.

Q.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OLE Object on Sheet updates Value in Code but not its Display SteveM Excel Programming 3 February 14th 08 07:11 PM
Add code on the fly to existing userforms pan65 Excel Programming 8 January 4th 08 07:34 PM
New to userforms - can you help with this code? Anthony Excel Programming 10 December 11th 07 07:49 PM
Userforms keep popping up, need code to stop it rammieib Excel Programming 3 February 24th 06 06:24 PM
Code to not display delete sheet alerts John[_46_] Excel Programming 2 August 25th 03 01:44 PM


All times are GMT +1. The time now is 02:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"