Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Delay when userform resizes??

I created a Userform that has on command button on
top. When the command button is pressed, my code
will toggle/resize the Userform's height between 100
and 200 pixels.

I notice that sometimes when I press the command
button to initiate a resize subroutine that userform will
not always immediately resize. It's almost as if the
button press event gets lost or the resize fails. Why
is there sometimes a delay or lack of resize when
a command button is pressed??

BTW, when the command button is pressed I will
usually just run the following code:

UserForm1.Height = 100 ' or 200

thank u

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Delay when userform resizes??

--Do you have any code written in the Resize event ...
Private Sub UserForm_Resize()

End Sub

--Try using the Repaint method. If the contents or appearance of an object
changes significantly, and you don't want to wait until the system
automatically repaints the area.

Private Sub CommandButton1_Click()
UserForm1.Height = 100
UserForm1.Repaint
End Sub



--
Jacob


"Robert Crandal" wrote:

I created a Userform that has on command button on
top. When the command button is pressed, my code
will toggle/resize the Userform's height between 100
and 200 pixels.

I notice that sometimes when I press the command
button to initiate a resize subroutine that userform will
not always immediately resize. It's almost as if the
button press event gets lost or the resize fails. Why
is there sometimes a delay or lack of resize when
a command button is pressed??

BTW, when the command button is pressed I will
usually just run the following code:

UserForm1.Height = 100 ' or 200

thank u

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Delay when userform resizes??

No, I dont have code in the Userform_Resize() event. My userform
cannot be resized by mouse. I am only allowing them to pick
two different userform sizes, which are toggled with a command button.
Am I supposed to put code in there???

The .Repaint method seems to be what I'm looking for. However, it
seems like the dimensions will not change if I press the command
button repeatedly to toggle between sizes in a fast manner. I know
this isn't important, but I just expect the form to always resize itself
immediately when the button is pressed. 8(


"Jacob Skaria" wrote in message
...
--Do you have any code written in the Resize event ...
Private Sub UserForm_Resize()

End Sub

--Try using the Repaint method. If the contents or appearance of an object
changes significantly, and you don't want to wait until the system
automatically repaints the area.

Private Sub CommandButton1_Click()
UserForm1.Height = 100
UserForm1.Repaint
End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Delay when userform resizes??

Chip Pearson's webpage has excellent near drag and drop functions to resize
forms.

"Robert Crandal" wrote:

I created a Userform that has on command button on
top. When the command button is pressed, my code
will toggle/resize the Userform's height between 100
and 200 pixels.

I notice that sometimes when I press the command
button to initiate a resize subroutine that userform will
not always immediately resize. It's almost as if the
button press event gets lost or the resize fails. Why
is there sometimes a delay or lack of resize when
a command button is pressed??

BTW, when the command button is pressed I will
usually just run the following code:

UserForm1.Height = 100 ' or 200

thank u

.

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
SUM formula that resizes? Excel Curious Excel Discussion (Misc queries) 3 April 9th 08 11:18 PM
Checkbox resizes? Todd Hank Excel Programming 0 February 2nd 07 06:54 PM
Long Time Delay To Paste From UserForm To Sheet Minitman Excel Worksheet Functions 7 December 6th 05 12:30 AM
Help resizes window &%$#! Oskar von dem Hagen Excel Discussion (Misc queries) 0 February 26th 05 01:09 AM
ComboBox text resizes on it's own Shane Holder Excel Programming 0 July 9th 04 06:19 PM


All times are GMT +1. The time now is 03:16 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"