View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Name the range AFTER copied to new sheet

Example...

Sub AddDefinedName(ByVal sName$, sRefersTo$, _
Optional IsLocal As Boolean = True)
Dim oScope As Object
If IsLocal Then
oScope = ActiveSheet: sName = "'" & oScope.Name & "'!" & sName
Else
oScope = ActiveWorkbook
End If ĚsLocal
oScope.Names.Add sName, RefersTo:= sRefersTo
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion