LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Combobox Events to Shrink and Expand Width

This is something that is a thorn in my side that I can't figure out. It's
probably not worth the time I have put into it, but that is programming I
guess.

I have a combobox that contains a list of 2 columns. Column 1 is displayed
in the textbox portion of the combobox and it contains two letter intials
that represent what is in Column 2, which is the description. For example,

' Product Code Description
Column 1 Column 2
PF Plastic Face
CC Custom Cabinet
PT Parts

Column 1 is the Product Code and shows in the textbox portion. Column 2
shows in the drop down list. The combobox needs to have an original width =
53, but I need to expand it to 120 if the user wants to change the product
code so they can see the full description.

This is what I have but the combobox doesn't go back to the origianl size of
53 after the combobox has been changed. Anyone have any ideas? This what I
have:

Private Sub cboProductCode_Change()
' put combobox to it original width
cboProductCode.Width = 53
End Sub

Private Sub cboProductCode_DropButtonClick()
' expand combobox to view list
cboProductCode.Width = 120
End Sub
--
Cheers,
Ryan
 
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
Can I expand & shrink columns? youngsequan Excel Discussion (Misc queries) 1 December 4th 09 11:44 PM
How to set a cell to expand to fit text in Excel not shrink fit Elisal Excel Worksheet Functions 1 December 4th 09 12:10 PM
Header Row with Option to Shrink/Expand Rows Beneath kippers Excel Worksheet Functions 2 June 22nd 09 12:50 PM
shrink to fit expand Curt Excel Programming 0 October 19th 07 05:59 PM
Shrink and expand a number of columns/rows balles Excel Worksheet Functions 1 February 17th 06 04:31 PM


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