View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.setup
Gord Dibben
 
Posts: n/a
Default Macro to convert Name of worksheet

Cool Bob

And I even understand it!!<g


Gord

On Mon, 21 Nov 2005 18:56:56 -0000, "Bob Phillips"
wrote:


Dim iPos As Long
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
On Error Resume Next
iPos = Application.Match(wks.Name, Range("LongNames"), 0)
On Error GoTo 0
If iPos 0 Then
wks.Name = Range("ShortNames").Cells(iPos, 1)
End If
Next wks