Hi
With FormExtraSheets.ListBoxExtraSheets
ActiveWorkbook.Worksheets(.Value).Delete
End With
- subscript out of range
With FormExtraSheets.ListBoxExtraSheets
shtName = .Value
ActiveWorkbook.Worksheets(shtName).Delete
End With
- works fine
Could someone explain to me, why, please, what the difference is
With FormExtraSheets.ListBoxExtraSheets
ActiveWorkbook.Worksheets(.Value).Delete
End With
- subscript out of range
With FormExtraSheets.ListBoxExtraSheets
shtName = .Value
ActiveWorkbook.Worksheets(shtName).Delete
End With
- works fine
Could someone explain to me, why, please, what the difference is