Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
--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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUM formula that resizes? | Excel Discussion (Misc queries) | |||
Checkbox resizes? | Excel Programming | |||
Long Time Delay To Paste From UserForm To Sheet | Excel Worksheet Functions | |||
Help resizes window &%$#! | Excel Discussion (Misc queries) | |||
ComboBox text resizes on it's own | Excel Programming |