Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Form Size after Click
I have a modeless form in a XL workbook to enable user to list record in a worksheet matching some criteria in a list box in a form. Sinc the form is a bit big, I want to reduce the form size and hide othe controls to show only the list box after user double clicks a record i the list box (to show more space of the worksheet)? Can anyone show m how to do this or direct me to some sample worbook to learn? Thanks! Regards, Huyeot -- Huyeot ----------------------------------------------------------------------- Huyeote's Profile: http://www.excelforum.com/member.php...fo&userid=1389 View this thread: http://www.excelforum.com/showthread.php?threadid=26268 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Form Size after Click
You should easily be able to adapt this :
Private Sub lstBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Const EXTRA As Integer = 30 Me.Height = lstBox1.Height + lstBox1.Top + EXTRA Me.Width = lstBox1.Width + lstBox1.Left + EXTRA End Sub Private Sub UserForm_Initialize() Dim i As Integer For i = 65 To 80 lstBox1.AddItem Chr$(i) Next End Sub Regards Rog -----Original Message----- I have a modeless form in a XL workbook to enable user to list records in a worksheet matching some criteria in a list box in a form. Since the form is a bit big, I want to reduce the form size and hide other controls to show only the list box after user double clicks a record in the list box (to show more space of the worksheet)? Can anyone show me how to do this or direct me to some sample worbook to learn? Thanks! Regards, Huyeote -- Huyeote ---------------------------------------------------------- -------------- Huyeote's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=13894 View this thread: http://www.excelforum.com/showthread...hreadid=262686 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can i change the size of a form control check box? | Excel Discussion (Misc queries) | |||
How to change syperlink from single click to double click | Excel Worksheet Functions | |||
Right Click within Form | Excel Discussion (Misc queries) | |||
how do I change the text size of a form check box | New Users to Excel | |||
Change the size of text used in a Form combo box | Excel Discussion (Misc queries) |