i have a userform with a listbox of worksheets from code thanks to 'NoSparks' @ Mr Excel that limits the worksheets so the Active one isn't listed.
>>> use code - tags <<<
I've copied this userform so I can just have specific worksheets {*lists*] listed, i tried to modify the code to do this with no luck. My last attempt was
any help would be appreciated
>>> use code - tags <<<
Code:
Private Sub UserForm_Initialize()
''''NoSparks @ Mr Excel 3.6.21
Dim sh As Worksheet, shtnames As String
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> ActiveSheet.Name Then
shtnames = shtnames & "|" & sh.Name
End If
Next sh
ListBox1.List = Split(Mid(shtnames, 2), "|")
End Sub
I've copied this userform so I can just have specific worksheets {*lists*] listed, i tried to modify the code to do this with no luck. My last attempt was
Code:
Dim sh As Worksheet, shtnames As String
For Each sh In ThisWorkbook.Worksheets
If sh.Name = "*LISTS" Then
shtnames = shtnames & "|" & sh.Name
End If
Next sh
ListBox1.List = Split(Mid(shtnames, 2), "|")
any help would be appreciated
Last edited by a moderator: