Single quotes in named range

V

Vik Mehta

I am defining a name for a range using

ActiveWorkbook.Names.Add Name:=strDefName, RefersTo:=strRange.

strDefName has a single quote in it and it's causing an error.

Can anyone help me with this?

Thanks.
Vik
 
H

Harlan Grove

Vik Mehta said:
I am defining a name for a range using

ActiveWorkbook.Names.Add Name:=strDefName, RefersTo:=strRange.

strDefName has a single quote in it and it's causing an error.

Can anyone help me with this?

No way to help. Defined names may contain letter, decimal digits and
underscores. Nothing else. You can't put a single quote into a name.
 
Top