Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box resizing on drop button click

Status
Not open for further replies.

paulcedarhill

Technical User
Mar 22, 2004
46
0
0
US
thread707-1606291

My first attempt at VBA includes a combo box that starting today has the text within the box getting smaller and smaller everytime it is selected. I have tried changing the Autotsize properties from Tur to Fals with no change.
Here is the code:

Private Sub ComboBox1_Change()
'Hide sheets per type change
Select Case ComboBox1.Value
Case "Research & Development", "New Formula Evaluation", "Chemistry Change to Existing Formula"
Call clear_all
Case "New Repack (Container opened)"
Call clear_all
Call repack
Case "Item Number or Description Change"
Call clear_all
Call pp_change
Case "New Re-label(Container not opened)", "New Name for Existing Product"
Call clear_all
Call relabel
Case "Item Number or Description Change "
Call clear_all
Call pp_change
Case "Campus Change or Add to exist Prod."
Call clear_all
Call campus_change
Case Else: Call clear_all
End Select

End Sub
Per thread707-1606291
I added Private Sub ComboBox1_DropButtonClick()
ComboBox1.Width = 256
End Sub
That keeps the box size constant but not the text within it.
 
Hi,

Can you insert a BREAK and STEP thru the code to observe at what point the resizing occres?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip,

Thanks for the quick response. Odd thing is now that I am goign back into the worksheet after closing EXCEL it all works fine. Sorry for the trouble.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top