View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel Name object bug

What does:

rngMyRange.Name = "MyName"

do?

--
Regards,
Tom Ogilvy


"DM Unseen" wrote in message
ups.com...
Duh,

following could seems to work around this issue:

Dim rngArea as Range
DIm strAddress as string

If rngMyRange .Areas.Count 1 Then
strAddress = vbNullString
For Each rngArea In rngNames.Areas
If Len(strAddress) 0 Then strAddress = strAddress &
Application.International(xlListSeparator)
strAddress = strAddress & rngArea.Address(, , , True)
Next rngArea
Else
strAddress = rngNames.Address(, , , True)
End If

shtMysheet.Names.Add "MyName", "=" & strAddress

Dm Unseen