Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below a section of code from the Initialise section of a
form. The intention is to resize the list box containing Hidden Sheet names to accomodate the sheet name. This works fine when stepped through, but fails when the run normally, though the Form itsself resizes as expected. It is part of a larger routine that was originally set to look for hidden rows or columns to unhide selectively Can anyone shed any light on why this might only work as expected when stepped through? With Me For Each c In a If Not c.Visible Then Xists = True .lstColLtrs.AddItem c.Name If .lstColLtrs.Width = 0 Then .lstColLtrs.Width = Len(c.Name) * .lstColLtrs.Font.Size Else tmp = .lstColLtrs.Width If Len(c.Name) * .lstColLtrs.Font.Size tmp Then _ .lstColLtrs.Width = Len(c.Name) * .lstColLtrs.Font.Size End If End If Next c .Caption = "Hidden Sheets" .btnShowCols.Caption = "Show Selected Sheets" .Width = .lstColLtrs.Width + 42 End With Using Excel 97 at present. Thanks in advance for any suggestions |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
Comments boxes resizing | Excel Discussion (Misc queries) | |||
Resizing "comments" boxes in a workbook all at once | Excel Discussion (Misc queries) | |||
Resizing comment boxes | Excel Programming | |||
resizing an image on a form | Excel Programming |