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
.
|