Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Often in some of the workbooks I've built, a modal userform will continue to
be visible even while the code processes. I'm trying to pin this down. Is it due to where in the code I turn screenupdating off or where the ".hide" statement appears? Or is it something else? I suspect I need to make sure I "hide" the form before turning off screenupdating. Does where the "hide" statement occurs have any bearing? IOW does that need to be in one of the events of the form or in the main module? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Have you tried......Unload Userform1 in the Private Su ComboBox1_Change() module or Userform1.Hide in the Private Su CommandButton1_Click() module? or in the Private Sub TextBox1_Change( module you could use Unload Me . Hope these help! Simon -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=27682 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try DoEvents. e.g. in your form code:
Sub cmdOK_Click Me.Hide DoEvents 'rest of your code Me.Show End Sub Robin Hammond www.enhanceddatasystems.com "CeeKay" wrote in message om... Often in some of the workbooks I've built, a modal userform will continue to be visible even while the code processes. I'm trying to pin this down. Is it due to where in the code I turn screenupdating off or where the ".hide" statement appears? Or is it something else? I suspect I need to make sure I "hide" the form before turning off screenupdating. Does where the "hide" statement occurs have any bearing? IOW does that need to be in one of the events of the form or in the main module? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try using
Application.screenupdating = true to clear the image of the form. Then set to false with another statement to hide screen activity. What you are seeing is a "ghost" image that Excel has not had time to clear. Robert Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "CeeKay" wrote in message om... Often in some of the workbooks I've built, a modal userform will continue to be visible even while the code processes. I'm trying to pin this down. Is it due to where in the code I turn screenupdating off or where the ".hide" statement appears? Or is it something else? I suspect I need to make sure I "hide" the form before turning off screenupdating. Does where the "hide" statement occurs have any bearing? IOW does that need to be in one of the events of the form or in the main module? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding a button when hiding rows | Excel Discussion (Misc queries) | |||
I need some help with userforms | Charts and Charting in Excel | |||
Userforms | Excel Programming | |||
Userforms | Excel Programming | |||
userforms | Excel Programming |