Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Shahzad
One way to do this would be to have 7 labels with the standard names i.e. Label1, Label2 then to use a loop to pass the value to the caption of the Label controls. I have included the code below. Option Explicit Dim Ctrl As Control Dim iNdx As Integer Dim i As Integer Private Sub ListBox1_Click() iNdx = ListBox1.ListIndex For i = 1 To 7 Set Ctrl = UserForm1.Controls("Label" & i) Ctrl.Caption = ListBox1.List(iNdx, i - 1) Set Ctrl = Nothing Next End Sub I hope this helps Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
label on top of a listbox | Excel Programming | |||
View List Items in Combo Box | Excel Worksheet Functions | |||
add items to listbox | Excel Programming | |||
Adding Items to a ListBox-Unique Items Only | Excel Programming | |||
Items in a Listbox | Excel Programming |