dotchieJack
Member
I have a piece of code that works great (thanks to Narayan)
When i change a worksheetname the list changes to
I would like to combine a second list into the code
First code that works fine
I would like to combine it with a second list
something like this
Any suggestion welcome
When i change a worksheetname the list changes to
I would like to combine a second list into the code
First code that works fine
Code:
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
If Sh.Name <> PrevShtName Then
With Application
.EnableEvents = False
.Index([List_of_Sheets], .Match(IIf(VBA.IsNumeric(PrevShtName), Val(PrevShtName), PrevShtName), [List_of_Sheets], 0)).Value = Sh.Name
.EnableEvents = True
End With
End If
End Sub
something like this
Code:
.Index([List_of_Sheets1], .Match(IIf(VBA.IsNumeric(PrevShtName), Val(PrevShtName), PrevShtName), [List_of_Sheets1], 0)).Value