Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook that I want to be able to add worksheets to it by checking selections in a MultiSelect Listbox, and I want the Tab Name to be the same as the Name selected in the MultiSelect Listbox.
I am stumped, I figured how to print sheets from a MultiSelect Box and even delete worksheets, but adding them has my puzzled. Thank you in advance for any help. WKWells -- Posted by Mimo Usenet Browser v0.2.5 http://www.mimousenet.com/mimo/post |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
i suppose that the ListBox have a single column otherwise for example, to retrieve the value of the 3rd column of a Listbox ListBox1.List(i, 2) For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) = True Then On Error Resume Next Sheets(ListBox1.List(i)).Select If Err.Number < 0 Then Err.Clear Sheets.Add(After:=Sheets(Sheets.Count)).Name = ListBox1.List(i) Else MsgBox " This sheet <" & ListBox1.List(i) & " already exist" End If End If Next i isabelle Le 2014-05-21 12:35, wkwells a écrit : I have a workbook that I want to be able to add worksheets to it by checking selections in a MultiSelect Listbox, and I want the Tab Name to be the same as the Name selected in the MultiSelect Listbox. I am stumped, I figured how to print sheets from a MultiSelect Box and even delete worksheets, but adding them has my puzzled. Thank you in advance for any help. WKWells |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect thank you much
On 23 May 2014 11:21 PM ,isabelle wrote: hi, i suppose that the ListBox have a single column otherwise for example, to retrieve the value of the 3rd column of a Listbox ListBox1.List(i, 2) For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) = True Then On Error Resume Next Sheets(ListBox1.List(i)).Select If Err.Number < 0 Then Err.Clear Sheets.Add(After:=Sheets(Sheets.Count)).Name = ListBox1.List(i) Else MsgBox " This sheet <" & ListBox1.List(i) & " already exist" End If End If Next i isabelle Le 2014-05-21 12:35, wkwells a écrit : I have a workbook that I want to be able to add worksheets to it by checking selections in a MultiSelect Listbox, and I want the Tab Name to be the same as the Name selected in the MultiSelect Listbox. I am stumped, I figured how to print sheets from a MultiSelect Box and even delete worksheets, but adding them has my puzzled. Thank you in advance for any help. WKWells -- Posted by Mimo Usenet Browser v0.2.5 http://www.mimousenet.com/mimo/post |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding over 30 worksheets in a workbook | New Users to Excel | |||
Need help with MultiSelect List Box | Excel Programming | |||
Multiselect List Box | Excel Programming | |||
List Box - MultiSelect | Excel Programming | |||
Multiselect list box | Excel Programming |