Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
rog rog is offline
external usenet poster
 
Posts: 39
Default 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
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
How can i change the size of a form control check box? pawlingJohn Excel Discussion (Misc queries) 2 January 15th 09 04:07 PM
How to change syperlink from single click to double click syperlinker Excel Worksheet Functions 0 June 13th 08 05:01 PM
Right Click within Form Rob Excel Discussion (Misc queries) 0 September 19th 07 02:20 PM
how do I change the text size of a form check box volfinkinder New Users to Excel 1 April 13th 06 05:28 PM
Change the size of text used in a Form combo box Mark Excel Discussion (Misc queries) 0 April 11th 06 03:08 PM


All times are GMT +1. The time now is 07:41 PM.

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

About Us

"It's about Microsoft Excel"