I pulled the guts of this little snippit from this forum and it works fine, but if I have two worksheets that result in the same label, there is an error. How would one go about writing it so that if a matching name exists, the new name would be something like 'name(2)'?
Also, since technically, this snippit is being called every time a selection is being made is there an easy way to optimize?
Thanks.
>Private Sub Worksheet_SelectionChange(ByVal >Target As Excel.Range)
>ActiveSheet.Name = ActiveSheet.Range("c3")
>End Sub
>
>This will rename the active sheet to whatever is in cell A1. Is that what you want?
This message was edited by vshague on 2002-10-09 15:34
Also, since technically, this snippit is being called every time a selection is being made is there an easy way to optimize?
Thanks.
>Private Sub Worksheet_SelectionChange(ByVal >Target As Excel.Range)
>ActiveSheet.Name = ActiveSheet.Range("c3")
>End Sub
>
>This will rename the active sheet to whatever is in cell A1. Is that what you want?
This message was edited by vshague on 2002-10-09 15:34