Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Below is some code that populates a list box with the used range of a worksheet and puts check boxes next to them. How can I adjust this code to: Show the first line as a header row (no check boxes) Is it possible to auto adjust the row height or make the text wrap inside the list box? Basically, some of the cells in the worksheet contain a lot of text that wraps in the cell and I would like it to do the same inside the list box. Thanks Private Sub UserForm_Initialize() Dim ColCnt As Integer Dim rng As Range Dim cw As String Dim c As Integer ColCnt = ActiveSheet.UsedRange.Columns.Count Set rng = ActiveSheet.UsedRange With ListBox1 .ColumnCount = ColCnt .RowSource = rng.Address cw = "" For c = 1 To .ColumnCount cw = cw & rng.Columns(c).Width & ";" Next c .ColumnWidths = cw .ListIndex = 0 End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto email - With every new entry on my user form | Excel Discussion (Misc queries) | |||
Auto Adjusting Text Box | Excel Discussion (Misc queries) | |||
Auto fill text boxes in user form by inputting data in another | Excel Programming | |||
Auto-starting a User Form | Excel Programming | |||
Auto loading of a user form sometimes | Excel Programming |