Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding Userforms

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding Userforms


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Hiding Userforms

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Hiding Userforms

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
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
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
I need some help with userforms T.c.Goosen1977 Charts and Charting in Excel 0 June 30th 06 09:29 AM
Userforms desperate Excel Programming 1 October 19th 04 08:08 PM
Userforms nath Excel Programming 1 May 20th 04 04:53 PM
userforms R Excel Programming 2 May 2nd 04 04:21 AM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"